Android Club – How to set border for TextView?

Create resource file inside res/drawable. Name it shape_border.xml:

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
   <solid android:color="#ffffff" />
   <stroke android:width="1dip" android:color="#4fa5d5"/>
</shape>

In your TextView, use this shape:

<TextView android:text="Some text" android:background="@drawable/back"/>

Android Club – Change ActionBarDrawerToggle for fragments: hamburger/back icon

This is not tutorial. This is example code how to implement one fragment as Home Fragment, others as children. If you are on home parent fragment – app shows hamburger icon, if you are on child fragment, it will show back button. If you want to know more about how to implement Material Design Navigation Drawer, you can open this post here

Continue reading Android Club – Change ActionBarDrawerToggle for fragments: hamburger/back icon

Android – How to change fragments when navigation drawer item selected?

This is logical continuation to previous tutorial – Android – Material Design Navigation Drawer. If you have not done that tutorial, please open and implement what is written there.

In this tutorial, I will show how to change fragments when Material Design Navigation Drawer item selected. Continue reading Android – How to change fragments when navigation drawer item selected?