Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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