Skip to content

Instantly share code, notes, and snippets.

@Karthik128
Created June 7, 2016 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Karthik128/9ccaa86b8e04a32d6b48d7a7f72b7cc4 to your computer and use it in GitHub Desktop.
Save Karthik128/9ccaa86b8e04a32d6b48d7a7f72b7cc4 to your computer and use it in GitHub Desktop.
materialDesignFAM = (FloatingActionMenu) findViewById(R.id.social_floating_menu);
floatingActionButton1 = (FloatingActionButton) findViewById(R.id.floating_facebook);
floatingActionButton2 = (FloatingActionButton) findViewById(R.id.floating_twitter);
floatingActionButton3 = (FloatingActionButton) findViewById(R.id.floating_linkdin);
floatingActionButton4 = (FloatingActionButton) findViewById(R.id.floating_google_plus);
floatingActionButton5 = (FloatingActionButton) findViewById(R.id.floating_instagram);
floatingActionButton6 = (FloatingActionButton) findViewById(R.id.floating_youtube);
floatingActionButton1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//TODO something when floating action menu first item clicked
Intent facebookIntent = getOpenFacebookIntent(MainActivity.this);
startActivity(facebookIntent);
}
});
floatingActionButton2.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//TODO something when floating action menu second item clicked
Intent twitterIntent = getOpenTwitterIntent(MainActivity.this);
startActivity(twitterIntent);
}
});
floatingActionButton3.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//TODO something when floating action menu third item clicked
Intent linkdinIntent = getOpenLinkdinIntent(MainActivity.this);
startActivity(linkdinIntent);
}
});
floatingActionButton4.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//TODO something when floating action menu first item clicked
Intent googleplusIntent = getOpenGPlusIntent(MainActivity.this);
startActivity(googleplusIntent);
}
});
floatingActionButton5.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//TODO something when floating action menu second item clicked
Intent instagramIntent = getOpenInstagramIntent(MainActivity.this);
startActivity(instagramIntent);
}
});
floatingActionButton6.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//TODO something when floating action menu third item clicked
Intent youtubeIntent = getOpenYouTubeIntent(MainActivity.this);
startActivity(youtubeIntent);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment