add a placeholder account icon to drawer

This commit is contained in:
Andrew Dolgov 2015-06-01 22:39:33 +03:00
parent 7ffcd894df
commit ac5e981cbc
3 changed files with 31 additions and 2 deletions

View File

@ -26,7 +26,6 @@ import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
@ -241,6 +240,7 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
} catch (MalformedURLException e) {
server.setText("");
}
} catch (InflateException e) {
// welp couldn't inflate header i guess
e.printStackTrace();

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid
android:color="@android:color/white"/>
<size
android:width="48dp"
android:height="48dp"/>
</shape>

View File

@ -16,13 +16,30 @@
android:tint="?colorPrimaryDark"
android:tintMode="multiply" />
<FrameLayout
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@drawable/circle_bg"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_marginRight="16dp" >
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/ic_account"
android:layout_gravity="center" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="56dp"
android:orientation="vertical"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
android:layout_alignParentStart="true"
android:id="@+id/linearLayout">
<TextView
android:id="@+id/drawer_header_login"