add Video to Links section of App Details
This commit is contained in:
parent
6fae74b36d
commit
4bb7050725
@ -396,11 +396,14 @@ public class App extends ValueObject implements Comparable<App>, Parcelable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if key starts with Upper case, its set by humans
|
// if key starts with Upper case, its set by humans
|
||||||
video = getLocalizedEntry(localized, localesToUse, "Video");
|
String value = getLocalizedEntry(localized, localesToUse, "Video");
|
||||||
|
if (!TextUtils.isEmpty(value)) {
|
||||||
|
video = value.split("\n", 1)[0];
|
||||||
|
}
|
||||||
whatsNew = getLocalizedEntry(localized, localesToUse, "WhatsNew");
|
whatsNew = getLocalizedEntry(localized, localesToUse, "WhatsNew");
|
||||||
// Name, Summary, Description existed before localization so they shouldn't replace
|
// Name, Summary, Description existed before localization so they shouldn't replace
|
||||||
// non-localized old data format with a null or blank string
|
// non-localized old data format with a null or blank string
|
||||||
String value = getLocalizedEntry(localized, localesToUse, "Name");
|
value = getLocalizedEntry(localized, localesToUse, "Name");
|
||||||
if (!TextUtils.isEmpty(value)) {
|
if (!TextUtils.isEmpty(value)) {
|
||||||
name = value;
|
name = value;
|
||||||
}
|
}
|
||||||
|
@ -740,6 +740,11 @@ public class AppDetailsRecyclerViewAdapter
|
|||||||
updateExpandableItem(false);
|
updateExpandableItem(false);
|
||||||
contentView.removeAllViews();
|
contentView.removeAllViews();
|
||||||
|
|
||||||
|
// Video link
|
||||||
|
if (uriIsSetAndCanBeOpened(app.video)) {
|
||||||
|
addLinkItemView(contentView, R.string.menu_video, R.drawable.ic_video, app.video);
|
||||||
|
}
|
||||||
|
|
||||||
// Source button
|
// Source button
|
||||||
if (uriIsSetAndCanBeOpened(app.sourceCode)) {
|
if (uriIsSetAndCanBeOpened(app.sourceCode)) {
|
||||||
addLinkItemView(contentView, R.string.menu_source, R.drawable.ic_source_code, app.sourceCode);
|
addLinkItemView(contentView, R.string.menu_source, R.drawable.ic_source_code, app.sourceCode);
|
||||||
|
7
app/src/main/res/drawable/ic_video.xml
Normal file
7
app/src/main/res/drawable/ic_video.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="24dp"
|
||||||
|
android:width="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path android:fillColor="#666666" android:pathData="M10,16.5V7.5L16,12M20,4.4C19.4,4.2 15.7,4 12,4C8.3,4 4.6,4.19 4,4.38C2.44,4.9 2,8.4 2,12C2,15.59 2.44,19.1 4,19.61C4.6,19.81 8.3,20 12,20C15.7,20 19.4,19.81 20,19.61C21.56,19.1 22,15.59 22,12C22,8.4 21.56,4.91 20,4.4Z" />
|
||||||
|
</vector>
|
@ -159,6 +159,7 @@
|
|||||||
<string name="menu_email">E-Mail Author</string>
|
<string name="menu_email">E-Mail Author</string>
|
||||||
<string name="menu_issues">Issues</string>
|
<string name="menu_issues">Issues</string>
|
||||||
<string name="menu_changelog">Changelog</string>
|
<string name="menu_changelog">Changelog</string>
|
||||||
|
<string name="menu_video">Video</string>
|
||||||
<string name="menu_source">Source Code</string>
|
<string name="menu_source">Source Code</string>
|
||||||
<string name="menu_upgrade">Upgrade</string>
|
<string name="menu_upgrade">Upgrade</string>
|
||||||
<string name="menu_donate">Donate</string>
|
<string name="menu_donate">Donate</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user