Posts

Showing posts from July, 2015

How to change the color of Hamburger icon in Toolbar Android

Image
Hello friends,  This tutorial is for changing Hamburger color on toolbar.  The default colors of Hamburger Navigation icon is white and black but we can change the color of hamburger icon.  Create a new style in style.xml. I created with name of drawerIcon. extends style by “Widget.AppCompat.DrawerArrowToggle”. <style name= "DrawerIcon" parent= "Widget.AppCompat.DrawerArrowToggle" > </style>          3. Add item color with given color code which color you want for hamburger. <style name= "DrawerIcon" parent= "Widget.AppCompat.DrawerArrowToggle" > <item name= "color" > @color/color_icon </item> </style>     4. Go to your main theme class. I have “AppTheme”.     5. Add your drawer theme to main theme with name of “drawerArrowStyle”. <style name= "AppTheme" parent= "Theme.AppCompat.Light.DarkActionBar" >

Facebook Login Using LoginButton

Image
Facebook SDK give two classes in Android to Login through Facebook 1. LoginButton class which provides UI of Login button and maintain the Login and Logout session. 2. LoginManager class which provides initiate login without using UI element. In This tutorial we will use LoginButton class. Below Step by Step process to Facebook Login using LoginButton.  1. Open Facebook Developer Account . 2. Go to MyApps and click on Add new app then the below pop-up window opened. 3. Select Android from above popup. The below window opened.  4. Type your app name (App name must not be contain word 'face' in it) and press skip quick start button. The below window opened. 5. Open Android Studio and create a project. 6. Now open app level gradle and add the below dependency. compile ' com . facebook . android : facebook - android - sdk: 4.4 . 0 ' 7. Open xml file and Add LoginButton into xml like below. <com.facebook.login.widget.LoginButton