mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Wmhack2018 (#1536)
* Add new activity to manifest * Create review activity layout base * Add a new menu item to drawer for peer review * Add a top menu with randomizer icon to review activity * Add strings for review button * Add activity to ActivityBuilderModule for injection * Add a new drawer item to start review acitivty * Create base of the Review Activity * Add fragment pager * Add new fragment for injection * Create a fragment pager layout * Wikimedia hackathon 2018 (#1533) * First draft of fn to get random recent image * Use log entries for requests to beta, try to connect refresh button FIXME: runs http request on main thread, breaks * Tweak button connection * Add ReviewController class * Fix fragments * Wmhack2018 (#1534) * tiny fixes * Load pictures into activities * Re-use same class for all review fragments (#1537) And try to add pager indicator * [WIP] category check * [WIP] add on-click actions to ReviewActivity * [WIP] add SendThankTask * Make it beautiful * Use standalone category extraction code in MediaDataExtractor * Add categories to category review page
This commit is contained in:
parent
1520fc01f7
commit
01cb9ccd70
28 changed files with 1086 additions and 45 deletions
9
app/src/main/res/drawable/ic_check_black_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_check_black_24dp.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/ic_refresh_black_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_refresh_black_24dp.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M17.65,6.35C16.2,4.9 14.21,4 12,4c-4.42,0 -7.99,3.58 -7.99,8s3.57,8 7.99,8c3.73,0 6.84,-2.55 7.73,-6h-2.08c-0.82,2.33 -3.04,4 -5.65,4 -3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6c1.66,0 3.14,0.69 4.22,1.78L13,11h7V4l-2.35,2.35z"/>
|
||||
</vector>
|
||||
12
app/src/main/res/drawable/tab_indicator_default.xml
Normal file
12
app/src/main/res/drawable/tab_indicator_default.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape
|
||||
android:innerRadius="0dp"
|
||||
android:shape="ring"
|
||||
android:thickness="2dp"
|
||||
android:useLevel="false">
|
||||
<solid android:color="@android:color/darker_gray"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
8
app/src/main/res/drawable/tab_indicator_selected.xml
Normal file
8
app/src/main/res/drawable/tab_indicator_selected.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:innerRadius="0dp"
|
||||
android:shape="ring"
|
||||
android:thickness="4dp"
|
||||
android:useLevel="false"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/commons_app_blue_dark"/>
|
||||
</shape>
|
||||
8
app/src/main/res/drawable/tab_selector.xml
Normal file
8
app/src/main/res/drawable/tab_selector.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/tab_indicator_selected"
|
||||
android:state_selected="true"/>
|
||||
|
||||
<item android:drawable="@drawable/tab_indicator_default"/>
|
||||
</selector>
|
||||
65
app/src/main/res/layout/activity_review.xml
Normal file
65
app/src/main/res/layout/activity_review.xml
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.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.support.design.widget.CoordinatorLayout
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/coordinator_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbar"
|
||||
layout="@layout/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</include>
|
||||
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar">
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/reviewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fadingEdge="none" />
|
||||
|
||||
|
||||
<com.viewpagerindicator.CirclePageIndicator
|
||||
android:id="@+id/reviewPagerIndicator"
|
||||
android:layout_height="@dimen/half_standard_height"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_below="@id/reviewPager"
|
||||
android:layout_gravity="bottom"
|
||||
android:elevation="3dp"
|
||||
android:background="?attr/colorPrimaryDark"
|
||||
/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/navigation_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/drawer_header"
|
||||
app:menu="@menu/drawer" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
89
app/src/main/res/layout/fragment_review_image.xml
Normal file
89
app/src/main/res/layout/fragment_review_image.xml
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:weightSum="6"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
>
|
||||
|
||||
<com.facebook.drawee.view.SimpleDraweeView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="3"
|
||||
android:src="@drawable/commons_logo_large"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/reviewQuestion"
|
||||
android:layout_width="match_parent"
|
||||
android:textColor="@android:color/black"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1.1"
|
||||
android:textAlignment="center"
|
||||
android:textSize="32sp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="testing1"
|
||||
/>
|
||||
<TextView
|
||||
android:id="@+id/reviewQuestionContext"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.7"
|
||||
android:textAlignment="center"
|
||||
android:textSize="24sp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="testing2"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reviewCategories"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.7"
|
||||
android:textSize="24sp"
|
||||
android:textAlignment="center"
|
||||
android:text="testing2"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.6"
|
||||
android:weightSum="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/yesButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:text="@string/yes"
|
||||
android:textSize="20sp"
|
||||
android:textColor="?attr/colorPrimaryDark"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/noButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/no"
|
||||
android:textSize="20sp"
|
||||
android:textColor="?attr/colorPrimaryDark"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.6"
|
||||
android:background="?attr/colorPrimaryDark"
|
||||
></View>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
@ -15,6 +15,11 @@
|
|||
android:icon="@drawable/ic_star_black_24dp"
|
||||
android:title="@string/navigation_item_featured_images"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_review"
|
||||
android:icon="@drawable/ic_check_black_24dp"
|
||||
android:title="@string/navigation_item_review"/>
|
||||
|
||||
</group>
|
||||
<group android:id="@+id/drawer_account">
|
||||
<item
|
||||
|
|
|
|||
10
app/src/main/res/menu/review_randomizer_menu.xml
Normal file
10
app/src/main/res/menu/review_randomizer_menu.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item android:id="@+id/action_review_randomizer"
|
||||
android:title="@string/menu_from_gallery"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:icon="@drawable/ic_refresh_white_24dp"
|
||||
/>
|
||||
|
||||
</menu>
|
||||
|
|
@ -83,6 +83,7 @@
|
|||
<string name="title_activity_settings">Settings</string>
|
||||
<string name="title_activity_signup">Sign Up</string>
|
||||
<string name="title_activity_featured_images">Featured Images</string>
|
||||
<string name="title_activity_review">Peer Review</string>
|
||||
<string name="menu_about">About</string>
|
||||
<string name="about_license">The Wikimedia Commons app is an open-source app created and maintained by grantees and volunteers of the Wikimedia community. The Wikimedia Foundation is not involved in the creation, development, or maintenance of the app. </string>
|
||||
<string name="trademarked_name" translatable="false">Wikimedia Commons</string>
|
||||
|
|
@ -219,6 +220,7 @@
|
|||
<string name="navigation_item_info">Tutorial</string>
|
||||
<string name="navigation_item_notification">Notifications</string>
|
||||
<string name="navigation_item_featured_images">Featured</string>
|
||||
<string name="navigation_item_review">Review</string>
|
||||
<string name="nearby_needs_permissions">Nearby places cannot be displayed without location permissions</string>
|
||||
<string name="no_description_found">no description found</string>
|
||||
<string name="nearby_info_menu_commons_article">Commons file page</string>
|
||||
|
|
@ -239,6 +241,8 @@
|
|||
<string name="null_url">Error! URL not found</string>
|
||||
<string name="nominate_deletion">Nominate for Deletion</string>
|
||||
<string name="nominated_for_deletion">This image has been nominated for deletion.</string>
|
||||
<string name="nominating_file_for_deletion">Nominating %1$s for deletion.</string>
|
||||
<string name="nominating_for_deletion_status">Nominating file for deletion: %1$s</string>
|
||||
<string name="nominated_see_more"><u>See webpage for details</u></string>
|
||||
<string name="view_browser">View in Browser</string>
|
||||
|
||||
|
|
@ -283,5 +287,31 @@
|
|||
<string name="share_app_title">Share App</string>
|
||||
<string name="share_coordinates_not_present">Coordinates were not specified during image selection</string>
|
||||
<string name="error_fetching_nearby_places">Error fetching nearby places.</string>
|
||||
<string name="getting_edit_token">Getting token for editing</string>
|
||||
<string name="check_category_adding_template">Adding template for category check</string>
|
||||
<string name="check_category_notification_title">Requesting category check for %1$s</string>
|
||||
<string name="check_category_edit_summary">Requesting category check</string>
|
||||
<string name="check_category_success_title">Requesting category check: Success</string>
|
||||
<string name="check_category_failure_title">Requesting category check: Failed</string>
|
||||
<string name="check_category_success_message">Successfully requested category check for %1$s</string>
|
||||
<string name="check_category_failure_message">Could not request category check for %1$s</string>
|
||||
<string name="check_category_toast">Requesting category check for %1$s</string>
|
||||
<string name="nominate_for_deletion_edit_file_page">Adding delete message to file</string>
|
||||
<string name="nominate_for_deletion_done">Done</string>
|
||||
<string name="nominate_for_deletion_notify_user">Notifying User on Talk page</string>
|
||||
<string name="nominate_for_deletion_edit_deletion_request_log">Adding file to Delete requests log</string>
|
||||
<string name="nominate_for_deletion_create_deletion_request">Creating Delete requests subpage</string>
|
||||
<string name="notsure">Not sure</string>
|
||||
<string name="send_thank_success_title">Sending Thanks: Success</string>
|
||||
<string name="send_thank_success_message">Successfully sent thanks to %1$s</string>
|
||||
<string name="send_thank_failure_message">Failed to send thanks %1$s</string>
|
||||
<string name="send_thank_failure_title">Sending Thanks: Failure</string>
|
||||
<string name="send_thank_send">Sending thanks</string>
|
||||
<string name="send_thank_notification_title">Sending thanks</string>
|
||||
<string name="send_thank_toast">Sending Thanks for %1$s</string>
|
||||
|
||||
<string name="review_copyright">Is this a copyright violation?</string>
|
||||
<string name="review_category">Is this mis-categorized?</string>
|
||||
<string name="review_spam">Is this spam?</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue