Skip to content
This repository has been archived by the owner on Jan 16, 2019. It is now read-only.

Commit

Permalink
version name in drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
ov3rk1ll committed Jan 7, 2015
1 parent b36bec3 commit bdd7c4a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import android.widget.ListView;
import android.widget.TextView;

import com.ov3rk1ll.kinocast.BuildConfig;
import com.ov3rk1ll.kinocast.R;

/**
Expand Down Expand Up @@ -124,7 +125,6 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
//getString(R.string.title_section7),
}));
mDrawerListView.setItemChecked(mCurrentSelectedPosition, true);

}

@Override
Expand All @@ -136,6 +136,8 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,

mDrawerListView = (ListView) view.findViewById(android.R.id.list);

((TextView) view.findViewById(R.id.textVersion)).setText("v" + BuildConfig.VERSION_NAME);

return view;
}

Expand Down
18 changes: 15 additions & 3 deletions app/src/main/res/layout/fragment_navigation_drawer.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
Expand Down Expand Up @@ -28,7 +28,19 @@
android:id="@android:id/list"
android:divider="@android:color/transparent"
tools:listitem="@android:layout/simple_list_item_1"
android:dividerHeight="0dp" />
android:dividerHeight="0dp"
android:layout_above="@+id/textVersion" />

</LinearLayout>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:paddingLeft="2dp"
android:textColor="@color/primary_text_default_material_dark"
android:id="@+id/textVersion"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />

</RelativeLayout>

0 comments on commit bdd7c4a

Please sign in to comment.