mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Integrated navigation drawer in the contributions activity
This commit is contained in:
parent
e40d2aabb2
commit
09cd596ff6
12 changed files with 297 additions and 165 deletions
|
|
@ -5,21 +5,32 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/contributionsFragmentContainer"
|
||||
android:orientation="horizontal">
|
||||
android:layout_height="match_parent">
|
||||
<include
|
||||
android:id="@+id/contributions_toolbar"
|
||||
layout="@layout/contributions_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/contributionsListFragment"
|
||||
android:name="fr.free.nrw.commons.contributions.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"
|
||||
android:layout_below="@id/contributions_toolbar">
|
||||
|
||||
</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>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/drawer_pane"
|
||||
|
|
|
|||
12
app/src/main/res/layout/contributions_toolbar.xml
Normal file
12
app/src/main/res/layout/contributions_toolbar.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.Toolbar
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
android:background="?attr/colorPrimaryDark">
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
|
@ -3,81 +3,99 @@
|
|||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/home_item"
|
||||
<ScrollView
|
||||
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"/>
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/darker_gray">
|
||||
<ImageView
|
||||
android:id="@+id/pictureOfTheDay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_height="140dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<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"/>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0.5dp"
|
||||
android:background="@android:color/black"/>
|
||||
|
||||
<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/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/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/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/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"/>
|
||||
<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"/>
|
||||
|
||||
<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/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/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/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"/>
|
||||
|
||||
<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"/>
|
||||
<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>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
|
@ -10,25 +10,25 @@
|
|||
app:showAsAction="ifRoom|withText"
|
||||
android:icon="?attr/iconPhoto"
|
||||
/>
|
||||
<item android:id="@+id/menu_nearby"
|
||||
android:title="@string/menu_nearby"
|
||||
app:showAsAction="never"
|
||||
/>
|
||||
<item android:id="@+id/menu_refresh"
|
||||
android:title="@string/menu_refresh"
|
||||
app:showAsAction="never"
|
||||
/>
|
||||
<item android:id="@+id/menu_about"
|
||||
android:title="@string/menu_about"
|
||||
app:showAsAction="never"
|
||||
/>
|
||||
<item android:id="@+id/menu_settings"
|
||||
android:title="@string/menu_settings"
|
||||
app:showAsAction="never"
|
||||
/>
|
||||
<item android:id="@+id/menu_feedback"
|
||||
android:title="@string/menu_feedback"
|
||||
app:showAsAction="never"
|
||||
/>
|
||||
<!--<item android:id="@+id/menu_nearby"-->
|
||||
<!--android:title="@string/menu_nearby"-->
|
||||
<!--app:showAsAction="never"-->
|
||||
<!--/>-->
|
||||
<!--<item android:id="@+id/menu_refresh"-->
|
||||
<!--android:title="@string/menu_refresh"-->
|
||||
<!--app:showAsAction="never"-->
|
||||
<!--/>-->
|
||||
<!--<item android:id="@+id/menu_about"-->
|
||||
<!--android:title="@string/menu_about"-->
|
||||
<!--app:showAsAction="never"-->
|
||||
<!--/>-->
|
||||
<!--<item android:id="@+id/menu_settings"-->
|
||||
<!--android:title="@string/menu_settings"-->
|
||||
<!--app:showAsAction="never"-->
|
||||
<!--/>-->
|
||||
<!--<item android:id="@+id/menu_feedback"-->
|
||||
<!--android:title="@string/menu_feedback"-->
|
||||
<!--app:showAsAction="never"-->
|
||||
<!--/>-->
|
||||
|
||||
</menu>
|
||||
|
|
|
|||
|
|
@ -185,6 +185,8 @@ Tap this message (or hit back) to skip this step.</string>
|
|||
<string name="login_failed_2fa_not_supported">Two factor authentication is currently not supported.</string>
|
||||
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="navigation_drawer_open">Open</string>
|
||||
<string name="navigation_drawer_close">Close</string>
|
||||
<string name="navigation_item_home">Home</string>
|
||||
<string name="navigation_item_upload">Upload</string>
|
||||
<string name="navigation_item_nearby">Nearby</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue