mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
With support for navigation drawer
This commit is contained in:
parent
27682433ac
commit
e40d2aabb2
10 changed files with 316 additions and 24 deletions
|
|
@ -1,17 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/contributionsFragmentContainer"
|
||||
>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<fragment
|
||||
android:name="fr.free.nrw.commons.contributions.ContributionsListFragment"
|
||||
android:id="@+id/contributionsListFragment"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:layout="@layout/fragment_contributions" />
|
||||
android:id="@+id/contributionsFragmentContainer"
|
||||
android:orientation="horizontal">
|
||||
|
||||
</FrameLayout>
|
||||
<fragment
|
||||
android:id="@+id/contributionsListFragment"
|
||||
android:name="fr.free.nrw.commons.contributions.ContributionsListFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:layout="@layout/fragment_contributions" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/drawer_pane"
|
||||
android:layout_width="320dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:background="@android:color/white">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/drawer_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
83
app/src/main/res/layout/navigation_drawer_menu.xml
Normal file
83
app/src/main/res/layout/navigation_drawer_menu.xml
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/home_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:textSize="20dp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="@string/navigation_item_home"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/upload_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:textSize="20dp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="@string/navigation_item_upload"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nearby_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:textSize="20dp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="@string/navigation_item_nearby"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:textSize="20dp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="@string/navigation_item_about"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/settings_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:textSize="20dp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="@string/navigation_item_settings"/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_marginRight="12dp"
|
||||
android:background="@android:color/white">
|
||||
</View>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/feedback_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:textSize="20dp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="@string/navigation_item_feedback"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/logout_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:textSize="20dp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/black"
|
||||
android:text="@string/navigation_item_logout"/>
|
||||
</LinearLayout>
|
||||
|
|
@ -184,4 +184,12 @@ Tap this message (or hit back) to skip this step.</string>
|
|||
<string name="set_limit">Set Recent Upload Limit</string>
|
||||
<string name="login_failed_2fa_not_supported">Two factor authentication is currently not supported.</string>
|
||||
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="navigation_item_home">Home</string>
|
||||
<string name="navigation_item_upload">Upload</string>
|
||||
<string name="navigation_item_nearby">Nearby</string>
|
||||
<string name="navigation_item_about">About</string>
|
||||
<string name="navigation_item_settings">Settings</string>
|
||||
<string name="navigation_item_feedback">Feedback</string>
|
||||
<string name="navigation_item_logout">Logout</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<resources>
|
||||
|
||||
<style name="DarkAppTheme" parent="Theme.AppCompat">
|
||||
<style name="DarkAppTheme" parent="Theme.AppCompat.NoActionBar">
|
||||
<item name="mainBackground">@color/main_background_dark</item>
|
||||
<item name="semitransparentText">@color/commons_app_blue_dark</item>
|
||||
<item name="commonsAppBlue">@color/activity_welcome_background_dark</item>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
<item name="spinnerTheme">@style/DarkSpinnerTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="LightAppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<style name="LightAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="mainBackground">@color/main_background_light</item>
|
||||
<item name="semitransparentText">@color/commons_app_blue_light</item>
|
||||
<item name="commonsAppBlue">@color/activity_welcome_background_light</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue