Resolves Reloading of image on moving to next question in peer review (#2709)

This commit is contained in:
Vanshika Arora 2019-03-24 03:36:12 +05:30 committed by Adam Jones
parent f7e6b20cab
commit cbab7dd303
5 changed files with 114 additions and 143 deletions

View file

@ -13,7 +13,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/toolbar"/>
<include layout="@layout/toolbar" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
@ -26,31 +26,71 @@
android:id="@+id/skip_image"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@android:color/transparent"
android:text="SKIP THIS IMAGE"
android:textColor="@color/button_blue_dark"
android:background="@android:color/transparent"
android:layout_weight="1"
android:textStyle="bold"/>
android:textStyle="bold" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginTop="5dp">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:src="@drawable/commons_logo_large" />
<RelativeLayout
android:id="@+id/uploadOverlay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="center|bottom"
android:background="#77000000"
android:gravity="center"
android:padding="@dimen/tiny_gap">
<TextView
android:id="@+id/imageCaption"
style="?android:textAppearanceMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFFFF" />
</RelativeLayout>
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="gone" />
</RelativeLayout>
<fr.free.nrw.commons.review.ReviewViewPager
android:id="@+id/reviewPager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:fadingEdge="none"
android:layout_weight="13.5"/>
android:layout_weight="13.5"
android:fadingEdge="none" />
<com.viewpagerindicator.CirclePageIndicator
android:id="@+id/reviewPagerIndicator"
android:layout_height="0dp"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:foregroundGravity="center_vertical"
android:elevation="1dp"
android:background="?attr/colorPrimaryDark"
android:layout_weight="0.5"
/>
android:background="?attr/colorPrimaryDark"
android:elevation="1dp"
android:foregroundGravity="center_vertical" />
</LinearLayout>

View file

@ -1,12 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scroll"
android:layout_width="wrap_content"
android:layout_height="match_parent"
@ -16,103 +14,59 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="6dp"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="300dp">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:src="@drawable/commons_logo_large" />
<RelativeLayout
android:id="@+id/uploadOverlay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center|bottom"
android:gravity="center"
android:layout_alignParentBottom="true"
android:background="#77000000"
android:padding="@dimen/tiny_gap"
>
<TextView
android:id="@+id/imageCaption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFFFF"
style="?android:textAppearanceMedium"
/>
</RelativeLayout>
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="visible"
/>
</RelativeLayout>
<TextView
android:id="@+id/reviewQuestion"
android:layout_width="match_parent"
android:layout_height="80dp"
android:textAlignment="center"
android:textSize="32sp"
android:textColor="?attr/reviewHeading"
android:gravity="center_vertical"
android:text="testing1"
/>
android:textAlignment="center"
android:textColor="?attr/reviewHeading"
android:textSize="32sp" />
<TextView
android:id="@+id/reviewQuestionContext"
android:layout_width="match_parent"
android:layout_height="100dp"
android:textAlignment="center"
android:textSize="22sp"
android:layout_marginBottom="15dp"
android:gravity="center_vertical"
android:text="testing2"
/>
android:textAlignment="center"
android:textSize="22sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="70dp"
android:weightSum="2"
android:orientation="horizontal">
android:orientation="horizontal"
android:weightSum="2">
<Button
android:id="@+id/yesButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_margin="@dimen/activity_margin_horizontal"
android:layout_weight="1"
android:background="@android:color/transparent"
android:text="@string/yes"
android:textSize="18sp"
android:textColor="@color/yes_button_color"
android:textAlignment="center"
/>
android:textColor="@color/yes_button_color"
android:textSize="18sp" />
<Button
android:id="@+id/noButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:layout_weight="1"
android:layout_margin="@dimen/activity_margin_horizontal"
android:layout_weight="1"
android:background="@android:color/transparent"
android:text="@string/no"
android:textSize="18sp"
android:textColor="@color/no_button_color"
android:textAlignment="center"
/>
android:textColor="@color/no_button_color"
android:textSize="18sp" />
</LinearLayout>