mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-11-02 15:53:55 +01:00
Changed statistics to badges
This commit is contained in:
parent
197855af0e
commit
776e099cde
5 changed files with 115 additions and 221 deletions
|
|
@ -44,6 +44,7 @@ dependencies {
|
||||||
implementation 'com.github.pedrovgs:renderers:3.3.3'
|
implementation 'com.github.pedrovgs:renderers:3.3.3'
|
||||||
implementation "org.maplibre.gl:android-sdk:$MAPLIBRE_VERSION"
|
implementation "org.maplibre.gl:android-sdk:$MAPLIBRE_VERSION"
|
||||||
implementation 'org.maplibre.gl:android-plugin-scalebar-v9:1.0.0'
|
implementation 'org.maplibre.gl:android-plugin-scalebar-v9:1.0.0'
|
||||||
|
implementation 'com.google.android.flexbox:flexbox:3.0.0'
|
||||||
|
|
||||||
implementation 'com.jakewharton.timber:timber:4.7.1'
|
implementation 'com.jakewharton.timber:timber:4.7.1'
|
||||||
implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0'
|
implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0'
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,16 @@ package fr.free.nrw.commons.profile.achievements;
|
||||||
|
|
||||||
import android.accounts.Account;
|
import android.accounts.Account;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.graphics.ColorMatrix;
|
||||||
|
import android.graphics.ColorMatrixColorFilter;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.view.ContextThemeWrapper;
|
import androidx.appcompat.view.ContextThemeWrapper;
|
||||||
|
|
@ -28,6 +32,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.disposables.CompositeDisposable;
|
import io.reactivex.disposables.CompositeDisposable;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
@ -92,10 +97,10 @@ public class AchievementsFragment extends CommonsDaggerSupportFragment {
|
||||||
binding.imagesUploadInfo.setOnClickListener(view -> showUploadInfo());
|
binding.imagesUploadInfo.setOnClickListener(view -> showUploadInfo());
|
||||||
binding.imagesRevertedInfo.setOnClickListener(view -> showRevertedInfo());
|
binding.imagesRevertedInfo.setOnClickListener(view -> showRevertedInfo());
|
||||||
binding.imagesUsedByWikiInfo.setOnClickListener(view -> showUsedByWikiInfo());
|
binding.imagesUsedByWikiInfo.setOnClickListener(view -> showUsedByWikiInfo());
|
||||||
binding.imagesNearbyInfo.setOnClickListener(view -> showImagesViaNearbyInfo());
|
binding.wikidataEditsIcon.setOnClickListener(view -> showImagesViaNearbyInfo());
|
||||||
binding.imagesFeaturedInfo.setOnClickListener(view -> showFeaturedImagesInfo());
|
binding.qualityImageIcon.setOnClickListener(view -> showFeaturedImagesInfo());
|
||||||
binding.thanksReceivedInfo.setOnClickListener(view -> showThanksReceivedInfo());
|
binding.featuredImageIcon.setOnClickListener(view -> showThanksReceivedInfo());
|
||||||
binding.qualityImagesInfo.setOnClickListener(view -> showQualityImagesInfo());
|
binding.thanksImageIcon.setOnClickListener(view -> showThanksReceivedInfo());
|
||||||
|
|
||||||
// DisplayMetrics used to fetch the size of the screen
|
// DisplayMetrics used to fetch the size of the screen
|
||||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||||
|
|
@ -132,11 +137,26 @@ public class AchievementsFragment extends CommonsDaggerSupportFragment {
|
||||||
binding.imageFeatured.setText("0");
|
binding.imageFeatured.setText("0");
|
||||||
binding.qualityImages.setText("0");
|
binding.qualityImages.setText("0");
|
||||||
binding.achievementLevel.setText("0");
|
binding.achievementLevel.setText("0");
|
||||||
|
binding.thanksReceived.setText("0");
|
||||||
|
Map<ImageView,TextView> badgeMap = Map.of(
|
||||||
|
binding.wikidataEditsIcon,binding.wikidataEdits,
|
||||||
|
binding.featuredImageIcon,binding.imageFeatured,
|
||||||
|
binding.qualityImageIcon, binding.qualityImages,
|
||||||
|
binding.thanksImageIcon, binding.thanksReceived
|
||||||
|
);
|
||||||
|
badgeRender(badgeMap);
|
||||||
setMenuVisibility(true);
|
setMenuVisibility(true);
|
||||||
return rootView;
|
return rootView;
|
||||||
}
|
}
|
||||||
setWikidataEditCount();
|
setWikidataEditCount();
|
||||||
setAchievements();
|
setAchievements();
|
||||||
|
Map<ImageView,TextView> badgeMap = Map.of(
|
||||||
|
binding.wikidataEditsIcon,binding.wikidataEdits,
|
||||||
|
binding.featuredImageIcon,binding.imageFeatured,
|
||||||
|
binding.qualityImageIcon, binding.qualityImages,
|
||||||
|
binding.thanksImageIcon, binding.thanksReceived
|
||||||
|
);
|
||||||
|
badgeRender(badgeMap);
|
||||||
return rootView;
|
return rootView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -479,4 +499,28 @@ public class AchievementsFragment extends CommonsDaggerSupportFragment {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* list the badgeset and set the 0 one to gray
|
||||||
|
* @param badgeMap
|
||||||
|
*/
|
||||||
|
public void badgeRender(Map<ImageView, TextView> badgeMap){
|
||||||
|
for(Map.Entry<ImageView,TextView> badge:badgeMap.entrySet()){
|
||||||
|
TextView textView= badge.getValue();
|
||||||
|
ImageView imageView=badge.getKey();
|
||||||
|
if(textView.getText().equals("0")){
|
||||||
|
Grayfilter(imageView);
|
||||||
|
textView.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Set imageView element to Gray
|
||||||
|
* @param imageView
|
||||||
|
*/
|
||||||
|
public void Grayfilter(ImageView imageView){
|
||||||
|
ColorMatrix matrix = new ColorMatrix();
|
||||||
|
matrix.setSaturation(0);
|
||||||
|
ColorMatrixColorFilter filter = new ColorMatrixColorFilter(matrix);
|
||||||
|
imageView.setColorFilter(filter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5
app/src/main/res/drawable/badge_number_background.xml
Normal file
5
app/src/main/res/drawable/badge_number_background.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="@color/divider_grey"/>
|
||||||
|
<corners android:radius="12dp"/>
|
||||||
|
</shape>
|
||||||
|
|
@ -335,104 +335,53 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/statistics"
|
android:text="@string/badges"
|
||||||
style="?android:textAppearanceLarge"
|
style="?android:textAppearanceLarge"
|
||||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
||||||
android:layout_marginTop="@dimen/activity_margin_vertical"
|
android:layout_marginTop="@dimen/activity_margin_vertical"
|
||||||
android:textAllCaps="true"/>
|
android:textAllCaps="true"/>
|
||||||
|
|
||||||
<RelativeLayout
|
<com.google.android.flexbox.FlexboxLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
android:id="@+id/layout_badges"
|
||||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
app:flexWrap="wrap">
|
||||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
<FrameLayout
|
||||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginTop="@dimen/activity_margin_horizontal">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/images_nearby_info"
|
android:padding="8dp"
|
||||||
android:layout_centerVertical="true"
|
>
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_toStartOf="@+id/wikidata_edits"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/wikidata_edits_icon"
|
android:id="@+id/wikidata_edits_icon"
|
||||||
android:layout_width="@dimen/overflow_icon_dimen"
|
android:layout_width="@dimen/overflow_icon_dimen"
|
||||||
android:layout_height="@dimen/overflow_icon_dimen"
|
android:layout_height="@dimen/overflow_icon_dimen"
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="0"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:srcCompat="@drawable/ic_custom_map_marker_dark" />
|
app:srcCompat="@drawable/ic_custom_map_marker_dark" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/images_nearby_data"
|
android:id="@+id/wikidata_edits"
|
||||||
style="?android:textAppearanceMedium"
|
android:text="2"
|
||||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
android:paddingLeft="8dp"
|
||||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
android:paddingRight="8dp"
|
||||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
android:layout_gravity="end|bottom"
|
||||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
android:background="@drawable/badge_number_background"
|
||||||
app:layout_constraintLeft_toRightOf="@id/wikidata_edits_icon"
|
/>
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintRight_toLeftOf="@id/images_nearby_info_icon"
|
|
||||||
android:text="@string/statistics_wikidata_edits" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="@dimen/medium_width"
|
android:layout_width="@dimen/medium_width"
|
||||||
android:layout_height="@dimen/medium_height"
|
android:layout_height="@dimen/medium_height"
|
||||||
android:id="@+id/images_nearby_info_icon"
|
android:id="@+id/images_nearby_info_icon"
|
||||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_gravity="top"
|
|
||||||
app:layout_constraintLeft_toRightOf="@id/images_nearby_data"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
|
||||||
app:srcCompat="@drawable/ic_info_outline_24dp"
|
app:srcCompat="@drawable/ic_info_outline_24dp"
|
||||||
app:tint="@color/primaryLightColor" />
|
app:tint="@color/primaryLightColor" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<FrameLayout
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="?android:textAppearanceMedium"
|
android:padding="8dp">
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_marginEnd="@dimen/half_standard_height"
|
|
||||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
tools:text="2"
|
|
||||||
android:id="@+id/wikidata_edits"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginTop="@dimen/activity_margin_horizontal">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/images_featured_info"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_toStartOf="@+id/image_featured"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="@dimen/overflow_icon_dimen"
|
android:layout_width="@dimen/overflow_icon_dimen"
|
||||||
android:layout_height="@dimen/overflow_icon_dimen"
|
android:layout_height="@dimen/overflow_icon_dimen"
|
||||||
|
|
@ -441,71 +390,29 @@
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:srcCompat="@drawable/featured"
|
app:srcCompat="@drawable/featured"
|
||||||
android:scaleType="centerCrop" />
|
android:scaleType="centerCrop" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
style="?android:textAppearanceMedium"
|
android:id="@+id/image_featured"
|
||||||
android:id="@+id/images_featured_data"
|
android:text="2"
|
||||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
android:paddingLeft="8dp"
|
||||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
android:paddingRight="8dp"
|
||||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
android:layout_gravity="end|bottom"
|
||||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
android:background="@drawable/badge_number_background"
|
||||||
app:layout_constraintLeft_toRightOf="@id/featured_image_icon"
|
/>
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintRight_toLeftOf="@id/images_featured_info_icon"
|
|
||||||
android:text="@string/statistics_featured" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="@dimen/medium_width"
|
android:layout_width="@dimen/medium_width"
|
||||||
android:layout_height="@dimen/medium_height"
|
android:layout_height="@dimen/medium_height"
|
||||||
android:id="@+id/images_featured_info_icon"
|
android:id="@+id/images_featured_info_icon"
|
||||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
|
||||||
app:layout_constraintLeft_toRightOf="@id/images_featured_data"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
|
||||||
android:layout_gravity="top"
|
android:layout_gravity="top"
|
||||||
app:srcCompat="@drawable/ic_info_outline_24dp"
|
app:srcCompat="@drawable/ic_info_outline_24dp"
|
||||||
app:tint="@color/primaryLightColor" />
|
app:tint="@color/primaryLightColor" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<FrameLayout
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="?android:textAppearanceMedium"
|
android:padding="8dp">
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
tools:text="2"
|
|
||||||
android:id="@+id/image_featured"
|
|
||||||
android:layout_marginEnd="@dimen/half_standard_height"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginTop="@dimen/activity_margin_horizontal">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/quality_images_info"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_toStartOf="@+id/quality_images"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="@dimen/overflow_icon_dimen"
|
android:layout_width="@dimen/overflow_icon_dimen"
|
||||||
android:layout_height="@dimen/overflow_icon_dimen"
|
android:layout_height="@dimen/overflow_icon_dimen"
|
||||||
|
|
@ -514,72 +421,29 @@
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:srcCompat="@drawable/ic_quality_images_logo"
|
app:srcCompat="@drawable/ic_quality_images_logo"
|
||||||
android:scaleType="centerInside" />
|
android:scaleType="centerInside" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
style="?android:textAppearanceMedium"
|
android:id="@+id/quality_images"
|
||||||
android:id="@+id/quality_images_data"
|
android:text="2"
|
||||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
android:paddingLeft="8dp"
|
||||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
android:paddingRight="8dp"
|
||||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
android:layout_gravity="end|bottom"
|
||||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
android:background="@drawable/badge_number_background"
|
||||||
app:layout_constraintLeft_toRightOf="@id/quality_image_icon"
|
/>
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintRight_toLeftOf="@id/quality_images_info_icon"
|
|
||||||
android:text="@string/statistics_quality" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="@dimen/medium_width"
|
android:layout_width="@dimen/medium_width"
|
||||||
android:layout_height="@dimen/medium_height"
|
android:layout_height="@dimen/medium_height"
|
||||||
android:id="@+id/quality_images_info_icon"
|
android:id="@+id/quality_images_info_icon"
|
||||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
|
||||||
app:layout_constraintLeft_toRightOf="@id/quality_images_data"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
|
||||||
android:layout_gravity="top"
|
android:layout_gravity="top"
|
||||||
app:srcCompat="@drawable/ic_info_outline_24dp"
|
app:srcCompat="@drawable/ic_info_outline_24dp"
|
||||||
app:tint="@color/primaryLightColor" />
|
app:tint="@color/primaryLightColor" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<FrameLayout
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="?android:textAppearanceMedium"
|
android:padding="8dp">
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
tools:text="2"
|
|
||||||
android:text="0"
|
|
||||||
android:id="@+id/quality_images"
|
|
||||||
android:layout_marginEnd="@dimen/half_standard_height"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginEnd="@dimen/activity_margin_horizontal">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/thanks_received_info"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_toStartOf="@+id/thanks_received"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="@dimen/overflow_icon_dimen"
|
android:layout_width="@dimen/overflow_icon_dimen"
|
||||||
android:layout_height="@dimen/overflow_icon_dimen"
|
android:layout_height="@dimen/overflow_icon_dimen"
|
||||||
|
|
@ -590,49 +454,28 @@
|
||||||
android:scaleType="centerCrop" />
|
android:scaleType="centerCrop" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="0dp"
|
android:layout_height="wrap_content"
|
||||||
style="?android:textAppearanceMedium"
|
android:id="@+id/thanks_received"
|
||||||
android:id="@+id/thanks_received_data"
|
android:text="2"
|
||||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
android:paddingLeft="8dp"
|
||||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
android:paddingRight="8dp"
|
||||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
android:layout_gravity="end|bottom"
|
||||||
android:layout_marginRight="@dimen/activity_margin_horizontal"
|
android:background="@drawable/badge_number_background"
|
||||||
app:layout_constraintLeft_toRightOf="@id/thanks_image_icon"
|
/>
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintRight_toLeftOf="@id/thanks_received_info_icon"
|
|
||||||
android:text="@string/statistics_thanks" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/thanks_received_info_icon"
|
||||||
android:layout_width="@dimen/medium_width"
|
android:layout_width="@dimen/medium_width"
|
||||||
android:layout_height="@dimen/medium_height"
|
android:layout_height="@dimen/medium_height"
|
||||||
android:id="@+id/thanks_received_info_icon"
|
|
||||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
|
||||||
app:layout_constraintLeft_toRightOf="@id/thanks_received_data"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
|
||||||
android:layout_gravity="top"
|
android:layout_gravity="top"
|
||||||
app:srcCompat="@drawable/ic_info_outline_24dp"
|
app:srcCompat="@drawable/ic_info_outline_24dp"
|
||||||
app:tint="@color/primaryLightColor" />
|
app:tint="@color/primaryLightColor"/>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<TextView
|
</com.google.android.flexbox.FlexboxLayout>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="?android:textAppearanceMedium"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
tools:text="2"
|
|
||||||
android:id="@+id/thanks_received"
|
|
||||||
android:layout_marginEnd="@dimen/half_standard_height"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
||||||
|
|
@ -370,7 +370,8 @@
|
||||||
<string name="delete">Delete</string>
|
<string name="delete">Delete</string>
|
||||||
<string name="Achievements">Achievements</string>
|
<string name="Achievements">Achievements</string>
|
||||||
<string name="Profile">Profile</string>
|
<string name="Profile">Profile</string>
|
||||||
<string name="statistics">Statistics</string>
|
<string name="statistics">Badges</string>
|
||||||
|
<string name="badges">Badges</string>
|
||||||
<string name="statistics_thanks">Thanks Received</string>
|
<string name="statistics_thanks">Thanks Received</string>
|
||||||
<string name="statistics_featured">Featured Images</string>
|
<string name="statistics_featured">Featured Images</string>
|
||||||
<string name="statistics_wikidata_edits">Images via \"Nearby Places\"</string>
|
<string name="statistics_wikidata_edits">Images via \"Nearby Places\"</string>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue