mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Resolves Reloading of image on moving to next question in peer review (#2709)
This commit is contained in:
parent
f7e6b20cab
commit
cbab7dd303
5 changed files with 114 additions and 143 deletions
|
|
@ -1,12 +1,15 @@
|
||||||
package fr.free.nrw.commons.review;
|
package fr.free.nrw.commons.review;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.facebook.drawee.view.SimpleDraweeView;
|
||||||
import com.google.android.material.navigation.NavigationView;
|
import com.google.android.material.navigation.NavigationView;
|
||||||
import com.viewpagerindicator.CirclePageIndicator;
|
import com.viewpagerindicator.CirclePageIndicator;
|
||||||
|
|
||||||
|
|
@ -20,6 +23,7 @@ import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import fr.free.nrw.commons.Media;
|
import fr.free.nrw.commons.Media;
|
||||||
import fr.free.nrw.commons.R;
|
import fr.free.nrw.commons.R;
|
||||||
|
import fr.free.nrw.commons.Utils;
|
||||||
import fr.free.nrw.commons.auth.AuthenticatedActivity;
|
import fr.free.nrw.commons.auth.AuthenticatedActivity;
|
||||||
import fr.free.nrw.commons.mwapi.MediaResult;
|
import fr.free.nrw.commons.mwapi.MediaResult;
|
||||||
import fr.free.nrw.commons.mwapi.MediaWikiApi;
|
import fr.free.nrw.commons.mwapi.MediaWikiApi;
|
||||||
|
|
@ -33,30 +37,41 @@ import timber.log.Timber;
|
||||||
|
|
||||||
public class ReviewActivity extends AuthenticatedActivity {
|
public class ReviewActivity extends AuthenticatedActivity {
|
||||||
|
|
||||||
|
public ReviewPagerAdapter reviewPagerAdapter;
|
||||||
|
public ReviewController reviewController;
|
||||||
|
@BindView(R.id.reviewPagerIndicator)
|
||||||
|
public CirclePageIndicator pagerIndicator;
|
||||||
@BindView(R.id.toolbar)
|
@BindView(R.id.toolbar)
|
||||||
Toolbar toolbar;
|
Toolbar toolbar;
|
||||||
@BindView(R.id.navigation_view)
|
@BindView(R.id.navigation_view)
|
||||||
NavigationView navigationView;
|
NavigationView navigationView;
|
||||||
@BindView(R.id.drawer_layout)
|
@BindView(R.id.drawer_layout)
|
||||||
DrawerLayout drawerLayout;
|
DrawerLayout drawerLayout;
|
||||||
|
|
||||||
@BindView(R.id.reviewPager)
|
@BindView(R.id.reviewPager)
|
||||||
ReviewViewPager reviewPager;
|
ReviewViewPager reviewPager;
|
||||||
|
|
||||||
@BindView(R.id.skip_image)
|
@BindView(R.id.skip_image)
|
||||||
Button skip_image_button;
|
Button skip_image_button;
|
||||||
|
@BindView(R.id.imageView)
|
||||||
|
SimpleDraweeView simpleDraweeView;
|
||||||
|
@BindView(R.id.progressBar)
|
||||||
|
ProgressBar progressBar;
|
||||||
|
@BindView(R.id.imageCaption)
|
||||||
|
TextView imageCaption;
|
||||||
|
@Inject
|
||||||
|
MediaWikiApi mwApi;
|
||||||
|
|
||||||
@Inject MediaWikiApi mwApi;
|
/**
|
||||||
|
* Consumers should be simply using this method to use this activity.
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param title Page title
|
||||||
|
*/
|
||||||
|
public static void startYourself(Context context, String title) {
|
||||||
|
Intent reviewActivity = new Intent(context, ReviewActivity.class);
|
||||||
|
context.startActivity(reviewActivity);
|
||||||
|
}
|
||||||
@Inject
|
@Inject
|
||||||
ReviewHelper reviewHelper;
|
ReviewHelper reviewHelper;
|
||||||
|
|
||||||
public ReviewPagerAdapter reviewPagerAdapter;
|
|
||||||
|
|
||||||
public ReviewController reviewController;
|
|
||||||
|
|
||||||
@BindView(R.id.reviewPagerIndicator)
|
|
||||||
public CirclePageIndicator pagerIndicator;
|
|
||||||
|
|
||||||
private CompositeDisposable compositeDisposable = new CompositeDisposable();
|
private CompositeDisposable compositeDisposable = new CompositeDisposable();
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -82,20 +97,16 @@ public class ReviewActivity extends AuthenticatedActivity {
|
||||||
reviewPager.setAdapter(reviewPagerAdapter);
|
reviewPager.setAdapter(reviewPagerAdapter);
|
||||||
reviewPagerAdapter.getItem(0);
|
reviewPagerAdapter.getItem(0);
|
||||||
pagerIndicator.setViewPager(reviewPager);
|
pagerIndicator.setViewPager(reviewPager);
|
||||||
|
progressBar.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
runRandomizer(); //Run randomizer whenever everything is ready so that a first random image will be added
|
runRandomizer(); //Run randomizer whenever everything is ready so that a first random image will be added
|
||||||
|
|
||||||
skip_image_button.setOnClickListener(view -> runRandomizer());
|
skip_image_button.setOnClickListener(view -> runRandomizer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("CheckResult")
|
||||||
|
|
||||||
public boolean runRandomizer() {
|
public boolean runRandomizer() {
|
||||||
ProgressBar progressBar = reviewPagerAdapter.reviewImageFragments[reviewPager.getCurrentItem()].progressBar;
|
progressBar.setVisibility(View.VISIBLE);
|
||||||
if (progressBar != null) {
|
|
||||||
progressBar.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
reviewPager.setCurrentItem(0);
|
reviewPager.setCurrentItem(0);
|
||||||
compositeDisposable.add(reviewHelper.getRandomMedia()
|
compositeDisposable.add(reviewHelper.getRandomMedia()
|
||||||
.map(Media::getFilename)
|
.map(Media::getFilename)
|
||||||
|
|
@ -105,18 +116,22 @@ public class ReviewActivity extends AuthenticatedActivity {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("CheckResult")
|
||||||
private void updateImage(String fileName) {
|
private void updateImage(String fileName) {
|
||||||
if (fileName.length() == 0) {
|
if (fileName.length() == 0) {
|
||||||
ViewUtil.showShortSnackbar(drawerLayout, R.string.error_review);
|
ViewUtil.showShortSnackbar(drawerLayout, R.string.error_review);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
simpleDraweeView.setImageURI(Utils.makeThumbBaseUrl(fileName));
|
||||||
reviewController.onImageRefreshed(fileName); //file name is updated
|
reviewController.onImageRefreshed(fileName); //file name is updated
|
||||||
compositeDisposable.add(reviewHelper.getFirstRevisionOfFile("File:" + fileName)
|
compositeDisposable.add(reviewHelper.getFirstRevisionOfFile("File:" + fileName)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(revision -> {
|
.subscribe(revision -> {
|
||||||
reviewController.firstRevision = revision;
|
reviewController.firstRevision = revision;
|
||||||
reviewPagerAdapter.updateFileInformation(fileName, revision);
|
reviewPagerAdapter.updateFileInformation(fileName);
|
||||||
|
((TextView) imageCaption).setText(fileName + " is uploaded by: " + revision.getUser());
|
||||||
|
progressBar.setVisibility(View.GONE);
|
||||||
}));
|
}));
|
||||||
reviewPager.setCurrentItem(0);
|
reviewPager.setCurrentItem(0);
|
||||||
compositeDisposable.add(Observable.fromCallable(() -> {
|
compositeDisposable.add(Observable.fromCallable(() -> {
|
||||||
|
|
@ -148,14 +163,4 @@ public class ReviewActivity extends AuthenticatedActivity {
|
||||||
runRandomizer();
|
runRandomizer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Consumers should be simply using this method to use this activity.
|
|
||||||
* @param context
|
|
||||||
* @param title Page title
|
|
||||||
*/
|
|
||||||
public static void startYourself(Context context, String title) {
|
|
||||||
Intent reviewActivity = new Intent(context, ReviewActivity.class);
|
|
||||||
context.startActivity(reviewActivity);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,7 @@ import android.widget.Button;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.facebook.drawee.view.SimpleDraweeView;
|
|
||||||
|
|
||||||
import fr.free.nrw.commons.R;
|
import fr.free.nrw.commons.R;
|
||||||
import fr.free.nrw.commons.Utils;
|
|
||||||
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
|
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
|
||||||
import fr.free.nrw.commons.media.model.MwQueryPage;
|
import fr.free.nrw.commons.media.model.MwQueryPage;
|
||||||
|
|
||||||
|
|
@ -30,28 +27,20 @@ public class ReviewImageFragment extends CommonsDaggerSupportFragment {
|
||||||
private String catString;
|
private String catString;
|
||||||
|
|
||||||
private View textViewQuestionContext;
|
private View textViewQuestionContext;
|
||||||
private View imageCaption;
|
|
||||||
private View textViewQuestion;
|
private View textViewQuestion;
|
||||||
private SimpleDraweeView simpleDraweeView;
|
|
||||||
|
|
||||||
private Button yesButton;
|
private Button yesButton;
|
||||||
private Button noButton;
|
private Button noButton;
|
||||||
|
|
||||||
|
|
||||||
public ProgressBar progressBar;
|
public ProgressBar progressBar;
|
||||||
private MwQueryPage.Revision revision;
|
private MwQueryPage.Revision revision;
|
||||||
|
|
||||||
|
|
||||||
public void update(int position, String fileName, MwQueryPage.Revision revision) {
|
public void update(int position, String fileName) {
|
||||||
this.position = position;
|
this.position = position;
|
||||||
this.fileName = fileName;
|
this.fileName = fileName;
|
||||||
this.revision = revision;
|
|
||||||
|
|
||||||
fillImageCaption();
|
|
||||||
|
|
||||||
if (simpleDraweeView != null) {
|
|
||||||
simpleDraweeView.setImageURI(Utils.makeThumbBaseUrl(fileName));
|
|
||||||
progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateCategories(Iterable<String> categories) {
|
public void updateCategories(Iterable<String> categories) {
|
||||||
|
|
@ -78,15 +67,11 @@ public class ReviewImageFragment extends CommonsDaggerSupportFragment {
|
||||||
position = getArguments().getInt("position");
|
position = getArguments().getInt("position");
|
||||||
View layoutView = inflater.inflate(R.layout.fragment_review_image, container,
|
View layoutView = inflater.inflate(R.layout.fragment_review_image, container,
|
||||||
false);
|
false);
|
||||||
progressBar = layoutView.findViewById(R.id.progressBar);
|
|
||||||
textViewQuestion = layoutView.findViewById(R.id.reviewQuestion);
|
textViewQuestion = layoutView.findViewById(R.id.reviewQuestion);
|
||||||
textViewQuestionContext = layoutView.findViewById(R.id.reviewQuestionContext);
|
textViewQuestionContext = layoutView.findViewById(R.id.reviewQuestionContext);
|
||||||
imageCaption = layoutView.findViewById(R.id.imageCaption);
|
|
||||||
yesButton = layoutView.findViewById(R.id.yesButton);
|
yesButton = layoutView.findViewById(R.id.yesButton);
|
||||||
noButton = layoutView.findViewById(R.id.noButton);
|
noButton = layoutView.findViewById(R.id.noButton);
|
||||||
|
|
||||||
fillImageCaption();
|
|
||||||
|
|
||||||
String question, explanation, yesButtonText, noButtonText;
|
String question, explanation, yesButtonText, noButtonText;
|
||||||
switch (position) {
|
switch (position) {
|
||||||
case COPYRIGHT:
|
case COPYRIGHT:
|
||||||
|
|
@ -125,7 +110,7 @@ public class ReviewImageFragment extends CommonsDaggerSupportFragment {
|
||||||
getReviewActivity().swipeToNext();
|
getReviewActivity().swipeToNext();
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default :
|
default:
|
||||||
question = "How did we get here?";
|
question = "How did we get here?";
|
||||||
explanation = "No idea.";
|
explanation = "No idea.";
|
||||||
yesButtonText = "yes";
|
yesButtonText = "yes";
|
||||||
|
|
@ -139,26 +124,13 @@ public class ReviewImageFragment extends CommonsDaggerSupportFragment {
|
||||||
yesButton.setText(yesButtonText);
|
yesButton.setText(yesButtonText);
|
||||||
noButton.setText(noButtonText);
|
noButton.setText(noButtonText);
|
||||||
|
|
||||||
if(position==CATEGORY){
|
if (position == CATEGORY) {
|
||||||
updateCategories(ReviewController.categories);
|
updateCategories(ReviewController.categories);
|
||||||
}
|
}
|
||||||
|
|
||||||
simpleDraweeView = layoutView.findViewById(R.id.imageView);
|
|
||||||
|
|
||||||
if (fileName != null) {
|
|
||||||
simpleDraweeView.setImageURI(Utils.makeThumbBaseUrl(fileName));
|
|
||||||
progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
return layoutView;
|
return layoutView;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ReviewActivity getReviewActivity() {
|
private ReviewActivity getReviewActivity() {
|
||||||
return (ReviewActivity) requireActivity();
|
return (ReviewActivity) requireActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillImageCaption() {
|
|
||||||
if (imageCaption != null && fileName != null && revision != null) {
|
|
||||||
((TextView) imageCaption).setText(fileName + " is uploaded by: " + revision.getUser());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,11 @@ public class ReviewPagerAdapter extends FragmentStatePagerAdapter {
|
||||||
|
|
||||||
public ReviewPagerAdapter(FragmentManager fm) {
|
public ReviewPagerAdapter(FragmentManager fm) {
|
||||||
super(fm);
|
super(fm);
|
||||||
reviewImageFragments = new ReviewImageFragment[] {
|
reviewImageFragments = new ReviewImageFragment[]{
|
||||||
new ReviewImageFragment(),
|
new ReviewImageFragment(),
|
||||||
new ReviewImageFragment(),
|
new ReviewImageFragment(),
|
||||||
new ReviewImageFragment(),
|
new ReviewImageFragment(),
|
||||||
new ReviewImageFragment()
|
new ReviewImageFragment()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -26,10 +26,10 @@ public class ReviewPagerAdapter extends FragmentStatePagerAdapter {
|
||||||
return reviewImageFragments.length;
|
return reviewImageFragments.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateFileInformation(String fileName, MwQueryPage.Revision revision) {
|
public void updateFileInformation(String fileName) {
|
||||||
for (int i = 0; i < getCount(); i++) {
|
for (int i = 0; i < getCount(); i++) {
|
||||||
ReviewImageFragment fragment = reviewImageFragments[i];
|
ReviewImageFragment fragment = reviewImageFragments[i];
|
||||||
fragment.update(i, fileName, revision);
|
fragment.update(i, fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="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"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -26,31 +26,71 @@
|
||||||
android:id="@+id/skip_image"
|
android:id="@+id/skip_image"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
android:text="SKIP THIS IMAGE"
|
android:text="SKIP THIS IMAGE"
|
||||||
android:textColor="@color/button_blue_dark"
|
android:textColor="@color/button_blue_dark"
|
||||||
android:background="@android:color/transparent"
|
android:textStyle="bold" />
|
||||||
android:layout_weight="1"
|
|
||||||
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
|
<fr.free.nrw.commons.review.ReviewViewPager
|
||||||
android:id="@+id/reviewPager"
|
android:id="@+id/reviewPager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:fadingEdge="none"
|
android:layout_weight="13.5"
|
||||||
android:layout_weight="13.5"/>
|
android:fadingEdge="none" />
|
||||||
|
|
||||||
|
|
||||||
<com.viewpagerindicator.CirclePageIndicator
|
<com.viewpagerindicator.CirclePageIndicator
|
||||||
android:id="@+id/reviewPagerIndicator"
|
android:id="@+id/reviewPagerIndicator"
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:foregroundGravity="center_vertical"
|
|
||||||
android:elevation="1dp"
|
|
||||||
android:background="?attr/colorPrimaryDark"
|
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
/>
|
android:background="?attr/colorPrimaryDark"
|
||||||
|
android:elevation="1dp"
|
||||||
|
android:foregroundGravity="center_vertical" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/scroll"
|
android:id="@+id/scroll"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
@ -16,103 +14,59 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="6dp"
|
||||||
android:orientation="vertical">
|
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
|
<TextView
|
||||||
android:id="@+id/reviewQuestion"
|
android:id="@+id/reviewQuestion"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="32sp"
|
|
||||||
android:textColor="?attr/reviewHeading"
|
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="testing1"
|
android:text="testing1"
|
||||||
/>
|
android:textAlignment="center"
|
||||||
|
android:textColor="?attr/reviewHeading"
|
||||||
|
android:textSize="32sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/reviewQuestionContext"
|
android:id="@+id/reviewQuestionContext"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="100dp"
|
android:layout_height="100dp"
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="22sp"
|
|
||||||
android:layout_marginBottom="15dp"
|
android:layout_marginBottom="15dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="testing2"
|
android:text="testing2"
|
||||||
/>
|
android:textAlignment="center"
|
||||||
|
android:textSize="22sp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="70dp"
|
android:layout_height="70dp"
|
||||||
android:weightSum="2"
|
android:orientation="horizontal"
|
||||||
android:orientation="horizontal">
|
android:weightSum="2">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/yesButton"
|
android:id="@+id/yesButton"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_margin="@dimen/activity_margin_horizontal"
|
android:layout_margin="@dimen/activity_margin_horizontal"
|
||||||
|
android:layout_weight="1"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:text="@string/yes"
|
android:text="@string/yes"
|
||||||
android:textSize="18sp"
|
|
||||||
android:textColor="@color/yes_button_color"
|
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
/>
|
android:textColor="@color/yes_button_color"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/noButton"
|
android:id="@+id/noButton"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_margin="@dimen/activity_margin_horizontal"
|
android:layout_margin="@dimen/activity_margin_horizontal"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
android:text="@string/no"
|
android:text="@string/no"
|
||||||
android:textSize="18sp"
|
|
||||||
android:textColor="@color/no_button_color"
|
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
/>
|
android:textColor="@color/no_button_color"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue