mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
* Add additional classes from 2019 hackathon implementation * Make first tab work * Make explore tab work * Handle back button for contrib and nearby * Fix framelayout and nav bar allignment * Fix nav bar tint * Fix nearby card layout * Make contributions number visible * Change menu icon according to fragment * Make notification icon work and remove drawer * Make favourites accessible from nav bar * Turn bookmark and explore activities into fragments * Use bottom sheet instead of more fragment * Add actions * Remove unused classes * Fix indentation * remove more fragment title * Fix explore fragment indentation * Make toolbar settings as we wanted * Set card view styles * Make colors for explore actiivty * Remove drawer from achievements activity * Add back button to achievements activity * remove drawer from review activity * Remove drawer from settings activity * Remove drawer from about activity * Fix dagger injection of fragment * Implement skip login version * Add theme missing colors * Add style to moresheet * refactor name * call login with button * Remove all old bookmarks activity dependency * Make explore tab items clickable * Do nothing if same tab is selected * Fix notification icon color for dark theme * Fix wrong drawable colors * Handle back button after media details is visible from contrib and explore fragments * make favourites open media details * Fix profile icon * Make user name visible instead * Move user back to contrib fragment * Remove NavigationBaseAvticity * Fix typo in bookmark fragment * Fix menu button colors * Remove explore activity * remove drawer and dependencies * Make bookmark media details visible * Cleanup code * Code cleanup * Remove unused layout * Make contriblist UI look like in mockups * Change limited connecton toggle * Move list menu item to nearby fragment * Fix search button crash * Make media detail appear * Back button added * Fix back button npe * Change bookmark list view * Fix always the firs item displayed issue * Allign contrib list bottom line to simple drawee bottom * fix fragment string * Fix back button for mobile uploads * Make lists appear * Make fav item selected * Make favourites clickable * Add back button to media details * Add toolbar of notification activity * Change contributions icon * Fix card UI * Fix back button in explore * Make card views look similar to mockups * Solve campaign bug visible issue * Make borders a little softer
This commit is contained in:
parent
5d82629109
commit
71d200ee41
110 changed files with 2225 additions and 1629 deletions
|
|
@ -163,7 +163,4 @@
|
|||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/drawer_view" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<include layout="@layout/toolbar"/>
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/tabBackground"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
||||
app:tabIndicatorColor="?attr/tabIndicatorColor"
|
||||
app:tabMode="fixed"
|
||||
app:tabSelectedTextColor="?attr/tabSelectedTextColor"
|
||||
app:tabTextColor="?attr/tabTextColor" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewPagerBookmarks"
|
||||
android:layout_width="@dimen/dimen_0"
|
||||
android:layout_height="@dimen/dimen_0"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tab_layout" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="@dimen/dimen_0"
|
||||
android:layout_height="@dimen/dimen_0"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<include layout="@layout/drawer_view" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
@ -44,6 +44,4 @@
|
|||
android:layout_below="@id/toolbar_layout" />
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/drawer_view" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
@ -19,7 +19,4 @@
|
|||
|
||||
</FrameLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/drawer_view" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/contributionsListBackground"
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
>
|
||||
<include layout="@layout/toolbar"/>
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/tabBackground"
|
||||
app:tabIndicatorColor="?attr/tabIndicatorColor"
|
||||
app:tabSelectedTextColor="?attr/tabSelectedTextColor"
|
||||
app:tabTextColor="?attr/tabTextColor"
|
||||
android:layout_below="@id/toolbar"
|
||||
app:tabMode="fixed" />
|
||||
|
||||
<FrameLayout android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/contributionsFragmentContainer"
|
||||
android:orientation="horizontal"
|
||||
android:layout_below="@id/tab_layout">
|
||||
|
||||
<fr.free.nrw.commons.contributions.UnswipableViewPager
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/drawer_view" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/toolbar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/primaryDarkColor">
|
||||
|
||||
<include layout="@layout/toolbar"/>
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:background="?attr/tabBackground"
|
||||
app:tabIndicatorColor="?attr/tabIndicatorColor"
|
||||
app:tabMode="fixed"
|
||||
app:tabSelectedTextColor="?attr/tabSelectedTextColor"
|
||||
app:tabTextColor="?attr/tabTextColor" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/mediaContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar_layout"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar_layout" />
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/drawer_view" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
@ -63,6 +63,4 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/drawer_view" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
@ -36,6 +36,4 @@
|
|||
android:layout_below="@id/toolbar_layout" />
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/drawer_view" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
@ -6,8 +6,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -116,9 +114,6 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<include layout="@layout/drawer_view" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
@ -85,6 +85,4 @@
|
|||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/drawer_view" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
@ -12,7 +12,6 @@
|
|||
android:layout_height="?attr/actionBarSize">
|
||||
<include layout="@layout/toolbar" />
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
|
@ -27,7 +26,4 @@
|
|||
tools:layout="@xml/preferences"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/drawer_view" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
@ -44,6 +44,4 @@
|
|||
android:layout_below="@id/toolbar_layout" />
|
||||
</RelativeLayout>
|
||||
|
||||
<include layout="@layout/drawer_view" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/drawerHeaderBackground"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pictureOfTheDay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="172dp"
|
||||
android:background="?attr/drawerHeaderBackground"
|
||||
android:paddingLeft="@dimen/standard_gap"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:paddingRight="@dimen/standard_gap"
|
||||
android:paddingBottom="@dimen/small_gap"
|
||||
app:srcCompat="@drawable/commons_logo"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/user_details"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/username"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/tiny_margin"
|
||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginEnd="@dimen/tiny_margin"
|
||||
android:layout_marginBottom="@dimen/activity_margin_horizontal"
|
||||
android:paddingBottom="@dimen/small_gap"
|
||||
android:textColor="@color/item_white_background"
|
||||
android:textSize="@dimen/subheading_text_size"
|
||||
tools:text="TextView" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/user_icon"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginStart="@dimen/tiny_margin"
|
||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginEnd="@dimen/tiny_margin"
|
||||
android:layout_marginBottom="@dimen/activity_margin_horizontal"
|
||||
android:textColor="@color/item_white_background"
|
||||
android:textSize="@dimen/subheading_text_size"
|
||||
app:srcCompat="@drawable/ic_person_black_24dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.navigation.NavigationView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/navigation_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:elevation="@dimen/miniscule_margin"
|
||||
app:headerLayout="@layout/drawer_header"
|
||||
app:menu="@menu/drawer" />
|
||||
|
|
@ -544,7 +544,4 @@
|
|||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<include layout="@layout/drawer_view" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
|
|
|||
39
app/src/main/res/layout/fragment_bookmarks.xml
Normal file
39
app/src/main/res/layout/fragment_bookmarks.xml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/toolbar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/card_light_grey">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:background="?attr/tabBackground"
|
||||
app:tabIndicatorColor="?attr/tabIndicatorColor"
|
||||
app:tabMode="fixed"
|
||||
app:tabSelectedTextColor="?attr/tabSelectedTextColor"
|
||||
app:tabTextColor="?attr/tabTextColor" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar_layout"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewPagerBookmarks"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar_layout" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -9,15 +9,14 @@
|
|||
android:id="@+id/card_view_nearby"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="?attr/mainCardBackground"
|
||||
/>
|
||||
android:layout_margin="@dimen/very_tiny_gap"/>
|
||||
|
||||
<fr.free.nrw.commons.campaigns.CampaignView
|
||||
android:id="@+id/campaigns_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/miniscule_margin"
|
||||
app:cardBackgroundColor="?attr/mainCardBackground" />
|
||||
android:layout_margin="@dimen/very_tiny_gap"/>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/root_frame"
|
||||
|
|
|
|||
38
app/src/main/res/layout/fragment_explore.xml
Normal file
38
app/src/main/res/layout/fragment_explore.xml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/toolbar_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/card_light_grey">
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/toolbar"
|
||||
android:background="?attr/tabBackground"
|
||||
app:tabIndicatorColor="?attr/tabIndicatorColor"
|
||||
app:tabMode="fixed"
|
||||
app:tabSelectedTextColor="?attr/tabSelectedTextColor"
|
||||
app:tabTextColor="?attr/tabTextColor" />
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/mediaContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar_layout"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar_layout" />
|
||||
</RelativeLayout>
|
||||
13
app/src/main/res/layout/fragment_featured_root.xml
Normal file
13
app/src/main/res/layout/fragment_featured_root.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/explore_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="visible"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -4,7 +4,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/mediaDetailsPager"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
84
app/src/main/res/layout/fragment_more_bottom_sheet.xml
Normal file
84
app/src/main/res/layout/fragment_more_bottom_sheet.xml
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:theme="?attr/more_bottom_sheet_style"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_profile"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:drawableStart="@drawable/ic_person_black_24dp"
|
||||
android:drawablePadding="12dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/Profile"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_peer_review"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:drawableStart="@drawable/ic_check_black_24dp"
|
||||
android:drawablePadding="12dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/navigation_item_review"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:drawableStart="@drawable/ic_settings_black_24dp"
|
||||
android:drawablePadding="12dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/menu_settings"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_tutorial"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:drawableStart="@drawable/ic_help_black_24dp"
|
||||
android:drawablePadding="12dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/navigation_item_info"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_feedback"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:drawableLeft="@drawable/ic_feedback_black_24dp"
|
||||
android:drawablePadding="12dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/navigation_item_feedback"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_about"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:drawableStart="@drawable/ic_info_outline_24dp"
|
||||
android:drawablePadding="12dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/navigation_item_about"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_logout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:drawableStart="@drawable/ic_exit_to_app_black_24dp"
|
||||
android:drawablePadding="12dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/navigation_item_logout"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:theme="?attr/more_bottom_sheet_style"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:drawableStart="@drawable/ic_settings_black_24dp"
|
||||
android:drawablePadding="12dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/menu_settings"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_tutorial"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:drawableStart="@drawable/ic_help_black_24dp"
|
||||
android:drawablePadding="12dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/navigation_item_info"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_feedback"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:drawableLeft="@drawable/ic_feedback_black_24dp"
|
||||
android:drawablePadding="12dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/navigation_item_feedback"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_about"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:drawableStart="@drawable/ic_info_outline_24dp"
|
||||
android:drawablePadding="12dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/navigation_item_about"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/more_login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:drawableStart="@drawable/ic_baseline_person_24"
|
||||
android:drawablePadding="12dp"
|
||||
android:padding="8dp"
|
||||
android:text="@string/navigation_item_login"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
|
@ -6,7 +6,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/card_border"
|
||||
android:minHeight="@dimen/large_height"
|
||||
android:padding="@dimen/small_gap"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -21,6 +23,7 @@
|
|||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:scaleType="centerCrop"
|
||||
app:srcCompat="@drawable/ic_campaign"
|
||||
android:tint="?attr/card_item_color"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -43,7 +46,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?attr/card_item_color"
|
||||
android:textStyle="bold"
|
||||
tools:text="Campaign Title"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
|
@ -56,7 +59,7 @@
|
|||
android:gravity="start"
|
||||
android:paddingTop="@dimen/miniscule_margin"
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?attr/card_item_color"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||
tools:text="Campaign Description"
|
||||
|
|
@ -70,7 +73,7 @@
|
|||
android:layout_weight="1"
|
||||
android:paddingTop="@dimen/miniscule_margin"
|
||||
android:text="@string/ends_on"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?attr/card_item_color"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_description"
|
||||
tools:ignore="MissingConstraints" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
|||
|
|
@ -26,13 +26,23 @@
|
|||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center|bottom"
|
||||
android:background="#AA000000"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/small_gap"
|
||||
>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center|bottom"
|
||||
android:background="?attr/contributionsListBackground"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center|bottom"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/small_gap"
|
||||
android:background="?attr/contributionsListBackground">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/categoryProgress"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -45,23 +55,36 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/categoryImageTitle"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
style="?android:textAppearanceLarge"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="?attr/contributionsListTextPrimary"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:srcCompat="@drawable/ic_baseline_person_14"/>
|
||||
<TextView
|
||||
android:id="@+id/categoryImageAuthor"
|
||||
android:textStyle="normal"
|
||||
android:textSize="14sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
style="?android:textAppearanceMedium"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="?attr/contributionsListTextSecondary"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
android:textColor="#33FFFFFF"
|
||||
android:textSize="98sp"
|
||||
android:typeface="serif" />
|
||||
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/contributionImage"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center|bottom"
|
||||
android:background="#AA000000"
|
||||
android:background="?attr/contributionsListBackground"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
|
|
@ -38,7 +38,8 @@
|
|||
android:layout_gravity="center|bottom"
|
||||
android:layout_weight="5"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/small_gap">
|
||||
android:padding="@dimen/small_gap"
|
||||
android:layout_marginStart="@dimen/tiny_gap">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/contributionProgress"
|
||||
|
|
@ -54,17 +55,39 @@
|
|||
style="?android:textAppearanceSmall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textColor="?attr/contributionsListTextSecondary"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contributionTitle"
|
||||
style="?android:textAppearanceMedium"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textColor="#FFFFFFFF" />
|
||||
android:textColor="?attr/contributionsListTextPrimary" />
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:srcCompat="@drawable/ic_baseline_person_14"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/authorView"
|
||||
android:textStyle="normal"
|
||||
android:textSize="14sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="?attr/contributionsListTextSecondary" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
@ -72,11 +95,11 @@
|
|||
android:id="@+id/image_options"
|
||||
android:layout_width="@dimen/dimen_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_weight="2.6"
|
||||
android:gravity="right"
|
||||
android:gravity="end|bottom"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/tiny_gap"
|
||||
android:paddingTop="@dimen/standard_gap"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageButton
|
||||
|
|
@ -98,6 +121,7 @@
|
|||
android:background="@android:color/transparent"
|
||||
android:padding="@dimen/activity_margin_horizontal"
|
||||
android:src="@drawable/ic_cancel_white"
|
||||
android:tint="?attr/contributionsListTextSecondary"
|
||||
android:text="@string/menu_cancel_upload" />
|
||||
|
||||
<ImageButton
|
||||
|
|
@ -109,6 +133,7 @@
|
|||
android:background="@android:color/transparent"
|
||||
android:padding="@dimen/activity_margin_horizontal"
|
||||
android:src="@drawable/ic_retry_white"
|
||||
android:tint="?attr/contributionsListTextSecondary"
|
||||
android:text="@string/menu_retry_upload" />
|
||||
|
||||
<ImageButton
|
||||
|
|
@ -120,6 +145,7 @@
|
|||
android:background="@android:color/transparent"
|
||||
android:padding="@dimen/activity_margin_horizontal"
|
||||
android:src="@drawable/ic_wikipedia"
|
||||
android:tint="?attr/contributionsListTextSecondary"
|
||||
android:text="@string/menu_cancel_upload"
|
||||
android:visibility="visible" />
|
||||
|
||||
|
|
|
|||
41
app/src/main/res/layout/main.xml
Normal file
41
app/src/main/res/layout/main.xml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/toolbar" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@id/fragment_main_nav_tab_layout"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<fr.free.nrw.commons.contributions.UnswipableViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
</FrameLayout>
|
||||
|
||||
<fr.free.nrw.commons.navtab.NavTabLayout
|
||||
android:id="@+id/fragment_main_nav_tab_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/nav_bar_background"
|
||||
android:elevation="6dp"
|
||||
app:itemIconTint="?attr/nav_tab_item_color_state"
|
||||
app:itemTextColor="?attr/navbar_item_text_color" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Switch xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/switch_toggle_limited_connection_mode"/>
|
||||
|
|
@ -1,11 +1,13 @@
|
|||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="?attr/mainCardBackground"
|
||||
android:layout_centerVertical="true"
|
||||
android:minHeight="@dimen/large_height">
|
||||
android:background="@drawable/card_border"
|
||||
android:minHeight="@dimen/large_height"
|
||||
android:padding="@dimen/small_gap"
|
||||
>
|
||||
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -17,7 +19,7 @@
|
|||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
||||
android:minWidth="@dimen/fragment_height"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?attr/card_item_color"
|
||||
android:singleLine="true"
|
||||
android:theme="?attr/mainScreenNearbyPermissionbutton"
|
||||
style="@style/Widget.AppCompat.Button.Borderless"/>
|
||||
|
|
@ -28,6 +30,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:id="@+id/content_layout"
|
||||
android:layout_centerInParent="true"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
|
||||
<ProgressBar
|
||||
|
|
@ -44,7 +47,9 @@
|
|||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginStart="@dimen/standard_gap"
|
||||
android:scaleType="centerCrop"
|
||||
app:srcCompat="@drawable/ic_location_white_24dp"/>
|
||||
app:srcCompat="@drawable/ic_location_white_24dp"
|
||||
android:tint="?attr/card_item_color"
|
||||
/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
|
|
@ -66,7 +71,7 @@
|
|||
android:layout_marginLeft="@dimen/standard_gap"
|
||||
android:layout_marginRight="@dimen/standard_gap"
|
||||
tools:text="test distance"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?attr/card_item_color"
|
||||
android:singleLine="true"
|
||||
>
|
||||
</TextView>
|
||||
|
|
@ -81,7 +86,7 @@
|
|||
android:minWidth="@dimen/fragment_height"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||
tools:text="test distance"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="?attr/card_item_color"
|
||||
android:singleLine="true"
|
||||
>
|
||||
|
||||
|
|
@ -91,4 +96,4 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
||||
android:gravity="center"
|
||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
||||
app:srcCompat="@drawable/ic_notifications_white_24dp" />
|
||||
app:srcCompat="?attr/notification_icon_drawable" />
|
||||
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/notification_count_badge"
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
android:background="@drawable/notification_badge"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/miniscule_margin"
|
||||
android:textColor="#ffffffff"
|
||||
android:textColor="?attr/notification_icon_text_color"
|
||||
android:textSize="7sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimaryDark"
|
||||
android:fitsSystemWindows="true"
|
||||
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
app:titleTextColor="?attr/toolbar_text_color"
|
||||
/>
|
||||
Loading…
Add table
Add a link
Reference in a new issue