use of android.support.design.widget.FloatingActionButton in project cw-omnibus by commonsguy.
the class AsyncDemoFragment method onViewCreated.
@Override
public void onViewCreated(View v, Bundle savedInstanceState) {
super.onViewCreated(v, savedInstanceState);
getListView().setScrollbarFadingEnabled(false);
setListAdapter(adapter);
FloatingActionButton fab = (FloatingActionButton) v.findViewById(R.id.refresh);
fab.setOnClickListener(this);
}
use of android.support.design.widget.FloatingActionButton in project cheesesquare by chrisbanes.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
final ActionBar ab = getSupportActionBar();
ab.setHomeAsUpIndicator(R.drawable.ic_menu);
ab.setDisplayHomeAsUpEnabled(true);
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
if (navigationView != null) {
setupDrawerContent(navigationView);
}
ViewPager viewPager = (ViewPager) findViewById(R.id.viewpager);
if (viewPager != null) {
setupViewPager(viewPager);
}
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Here's a Snackbar", Snackbar.LENGTH_LONG).setAction("Action", null).show();
}
});
TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs);
tabLayout.setupWithViewPager(viewPager);
}
use of android.support.design.widget.FloatingActionButton in project materialistic by hidroh.
the class AppUtilsTest method testFullscreenButton.
@Test
public void testFullscreenButton() {
ActivityController<TestListActivity> controller = Robolectric.buildActivity(TestListActivity.class);
TestListActivity activity = controller.create().get();
FloatingActionButton fab = new FloatingActionButton(activity);
AppUtils.toggleFabAction(fab, null, false);
fab.performClick();
assertThat(shadowOf(LocalBroadcastManager.getInstance(activity)).getSentBroadcastIntents()).isNotEmpty();
controller.destroy();
}
use of android.support.design.widget.FloatingActionButton in project animate by hitherejoe.
the class ForegroundFrame method addContentView.
private void addContentView(FrameLayout container) {
inflate(getContext(), R.layout.layout_frame, this);
FloatingActionButton floatingActionButton = (FloatingActionButton) findViewById(R.id.fab_quiz);
floatingActionButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
ViewPropertyAnimatorCompat animatorCompat = buildAnimation(v);
animatorCompat.setListener(new ViewPropertyAnimatorListener() {
@Override
public void onAnimationStart(View view) {
}
@Override
public void onAnimationEnd(View view) {
doStuff();
}
@Override
public void onAnimationCancel(View view) {
}
});
}
});
}
use of android.support.design.widget.FloatingActionButton in project MaterialDrawer by mikepenz.
the class CollapsingToolbarActivity method fillFab.
private void fillFab() {
final FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.floating_action_button);
fab.setImageDrawable(new IconicsDrawable(this, GoogleMaterial.Icon.gmd_favorite).actionBar().color(Color.WHITE));
}
Aggregations