Simplify the About screen
* Drop the "Translators" link (too many by now to manually keep a list of them) * Unify the "Report bugs" and "Translate" links into one "Support development" link that leads to the corresponding section in the Readme
This commit is contained in:
parent
d062f3b79b
commit
42a9b393f5
6 changed files with 21 additions and 133 deletions
|
@ -36,18 +36,16 @@ public class BaseAboutFragment extends Fragment {
|
|||
private static final String AUTHOR_ORIGINAL_GITHUB = "https://github.com/0xbb";
|
||||
private static final String AUTHOR_ORIGINAL_EXTRA = AUTHOR_ORIGINAL_GITHUB + "/otp-authenticator";
|
||||
|
||||
private static final String CONTRIBUTORS_URI = GITHUB_URI + "/blob/master/README.md#contributors";
|
||||
private static final String TRANSLATORS_URI = GITHUB_URI + "/blob/master/README.md#translators";
|
||||
private static final String CONTRIBUTORS_URI = GITHUB_URI + "/graphs/contributors";
|
||||
|
||||
private static final String BUGREPORT_URI = GITHUB_URI + "/issues";
|
||||
private static final String TRANSLATE_URI = "https://crowdin.com/project/andotp";
|
||||
private static final String SUPPORT_URI = GITHUB_URI + "/blob/master/README.md#contribute";
|
||||
|
||||
private Settings settings;
|
||||
|
||||
static final int[] imageResources = {
|
||||
R.id.aboutImgVersion, R.id.aboutImgLicense, R.id.aboutImgChangelog, R.id.aboutImgSource,
|
||||
R.id.aboutImgAuthor2, R.id.aboutImgAuthorOriginal, R.id.aboutImgContributors,
|
||||
R.id.aboutImgTranslators, R.id.aboutImgBugs, R.id.aboutImgTranslate
|
||||
R.id.aboutImgSupport
|
||||
};
|
||||
|
||||
static long lastTap = 0;
|
||||
|
@ -170,32 +168,18 @@ public class BaseAboutFragment extends Fragment {
|
|||
});
|
||||
|
||||
LinearLayout contributors = v.findViewById(R.id.about_layout_contributors);
|
||||
LinearLayout translators = v.findViewById(R.id.about_layout_translators);
|
||||
contributors.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
openURI(CONTRIBUTORS_URI);
|
||||
}
|
||||
});
|
||||
translators.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
openURI(TRANSLATORS_URI);
|
||||
}
|
||||
});
|
||||
|
||||
LinearLayout bugReport = v.findViewById(R.id.about_layout_bugs);
|
||||
LinearLayout translate = v.findViewById(R.id.about_layout_translate);
|
||||
bugReport.setOnClickListener(new View.OnClickListener() {
|
||||
LinearLayout supportLayout = v.findViewById(R.id.about_layout_support);
|
||||
supportLayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
openURI(BUGREPORT_URI);
|
||||
}
|
||||
});
|
||||
translate.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
openURI(TRANSLATE_URI);
|
||||
openURI(SUPPORT_URI);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<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="#FF727272"
|
||||
android:pathData="M20,8h-2.81c-0.45,-0.78 -1.07,-1.45 -1.82,-1.96L17,4.41 15.59,3l-2.17,2.17C12.96,5.06 12.49,5 12,5c-0.49,0 -0.96,0.06 -1.41,0.17L8.41,3 7,4.41l1.62,1.63C7.88,6.55 7.26,7.22 6.81,8L4,8v2h2.09c-0.05,0.33 -0.09,0.66 -0.09,1v1L4,12v2h2v1c0,0.34 0.04,0.67 0.09,1L4,16v2h2.81c1.04,1.79 2.97,3 5.19,3s4.15,-1.21 5.19,-3L20,18v-2h-2.09c0.05,-0.33 0.09,-0.66 0.09,-1v-1h2v-2h-2v-1c0,-0.34 -0.04,-0.67 -0.09,-1L20,10L20,8zM14,16h-4v-2h4v2zM14,12h-4v-2h4v2z"/>
|
||||
</vector>
|
9
app/src/main/res/drawable/ic_heart_gray.xml
Normal file
9
app/src/main/res/drawable/ic_heart_gray.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="#FF727272"
|
||||
android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z"/>
|
||||
</vector>
|
|
@ -1,9 +0,0 @@
|
|||
<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="#FF727272"
|
||||
android:pathData="M12.87,15.07l-2.54,-2.51 0.03,-0.03c1.74,-1.94 2.98,-4.17 3.71,-6.53L17,6L17,4h-7L10,2L8,2v2L1,4v1.99h11.17C11.5,7.92 10.44,9.75 9,11.35 8.07,10.32 7.3,9.19 6.69,8h-2c0.73,1.63 1.73,3.17 2.98,4.56l-5.09,5.02L4,19l5,-5 3.11,3.11 0.76,-2.04zM18.5,10h-2L12,22h2l1.12,-3h4.75L21,22h2l-4.5,-12zM15.88,17l1.62,-4.33L19.12,17h-3.24z"/>
|
||||
</vector>
|
|
@ -410,34 +410,6 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- translators -->
|
||||
<LinearLayout
|
||||
android:id="@+id/about_layout_translators"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/listPreferredItemHeight"
|
||||
android:paddingTop="@dimen/activity_margin_small"
|
||||
android:paddingBottom="@dimen/activity_margin_small"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/aboutImgTranslators"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/activity_margin"
|
||||
android:layout_marginEnd="@dimen/activity_margin_large"
|
||||
app:srcCompat="@drawable/ic_translate_gray" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/about_label_translators"
|
||||
android:textStyle="bold"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
|
@ -448,35 +420,23 @@
|
|||
android:layout_marginBottom="@dimen/activity_margin_small"
|
||||
style="?attr/cardStyle" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/about_title_support"/>
|
||||
|
||||
<!-- bug reports -->
|
||||
<LinearLayout
|
||||
android:id="@+id/about_layout_bugs"
|
||||
android:id="@+id/about_layout_support"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/activity_margin"
|
||||
android:paddingTop="@dimen/activity_margin_small"
|
||||
android:paddingBottom="@dimen/activity_margin_small"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/aboutImgBugs"
|
||||
android:id="@+id/aboutImgSupport"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/activity_margin"
|
||||
android:layout_marginEnd="@dimen/activity_margin_large"
|
||||
app:srcCompat="@drawable/ic_bug_report_gray" />
|
||||
app:srcCompat="@drawable/ic_heart_gray" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
|
@ -487,7 +447,7 @@
|
|||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/about_label_report_bugs"
|
||||
android:text="@string/about_title_support"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
@ -495,53 +455,11 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:text="@string/about_desc_report_bugs"/>
|
||||
android:text="@string/about_desc_support"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- translate -->
|
||||
<LinearLayout
|
||||
android:id="@+id/about_layout_translate"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/activity_margin_small"
|
||||
android:paddingBottom="@dimen/activity_margin_small"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/aboutImgTranslate"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/activity_margin"
|
||||
android:layout_marginEnd="@dimen/activity_margin_large"
|
||||
app:srcCompat="@drawable/ic_translate_gray" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical" >
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/about_label_translate"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:text="@string/about_desc_translate"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.CardView>
|
||||
|
||||
<!-- thumbnails -->
|
||||
|
|
|
@ -45,12 +45,7 @@
|
|||
|
||||
<!-- Support -->
|
||||
<string name="about_title_support">Support development</string>
|
||||
|
||||
<string name="about_label_report_bugs">Report Bugs</string>
|
||||
<string name="about_label_translate">Translate</string>
|
||||
|
||||
<string name="about_desc_report_bugs">Report bugs or request new features</string>
|
||||
<string name="about_desc_translate">Help to translate andOTP to your language</string>
|
||||
<string name="about_desc_support">Find out how you can support the development of andOTP</string>
|
||||
|
||||
<string name="about_title_special_features">Special features</string>
|
||||
<string name="about_dialog_special_features">Are you sure you want to enable the special
|
||||
|
|
Loading…
Reference in a new issue