Fixed crash when opening the about section.
This commit is contained in:
parent
9a73fcfee6
commit
3b3d49611f
6 changed files with 84 additions and 25 deletions
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li><b>NEW:</b> Fade album covers in the now playing screen in.</li>
|
<li><b>NEW:</b> Fade album covers in the now playing screen in.</li>
|
||||||
|
<li><b>FIX:</b> Crash when opening the <i>about section</i>.</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<h3>Version 0.9.45</h3>
|
<h3>Version 0.9.45</h3>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import android.support.v7.widget.AppCompatButton;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
|
@ -17,6 +18,7 @@ import com.kabouzeid.gramophone.R;
|
||||||
import com.kabouzeid.gramophone.dialogs.ChangelogDialog;
|
import com.kabouzeid.gramophone.dialogs.ChangelogDialog;
|
||||||
import com.kabouzeid.gramophone.dialogs.DonationDialog;
|
import com.kabouzeid.gramophone.dialogs.DonationDialog;
|
||||||
import com.kabouzeid.gramophone.ui.activities.base.AbsBaseActivity;
|
import com.kabouzeid.gramophone.ui.activities.base.AbsBaseActivity;
|
||||||
|
import com.kabouzeid.gramophone.util.ColorUtil;
|
||||||
|
|
||||||
import butterknife.Bind;
|
import butterknife.Bind;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
|
|
@ -24,6 +26,7 @@ import butterknife.ButterKnife;
|
||||||
/**
|
/**
|
||||||
* @author Karim Abou Zeid (kabouzeid)
|
* @author Karim Abou Zeid (kabouzeid)
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("FieldCanBeLocal")
|
||||||
public class AboutActivity extends AbsBaseActivity implements View.OnClickListener {
|
public class AboutActivity extends AbsBaseActivity implements View.OnClickListener {
|
||||||
|
|
||||||
private static String GOOGLE_PLUS = "https://google.com/+KarimAbouZeid23697";
|
private static String GOOGLE_PLUS = "https://google.com/+KarimAbouZeid23697";
|
||||||
|
|
@ -83,6 +86,31 @@ public class AboutActivity extends AbsBaseActivity implements View.OnClickListen
|
||||||
@Bind(R.id.aleksandar_tesic_google_plus)
|
@Bind(R.id.aleksandar_tesic_google_plus)
|
||||||
AppCompatButton aleksandarTesicGooglePlus;
|
AppCompatButton aleksandarTesicGooglePlus;
|
||||||
|
|
||||||
|
@Bind(R.id.icon_info)
|
||||||
|
ImageView iconInfo;
|
||||||
|
@Bind(R.id.icon_changelog)
|
||||||
|
ImageView iconChangelog;
|
||||||
|
@Bind(R.id.icon_bug_report)
|
||||||
|
ImageView iconBugReport;
|
||||||
|
@Bind(R.id.icon_google_plus_community)
|
||||||
|
ImageView iconGooglePlusCommunity;
|
||||||
|
@Bind(R.id.icon_flag)
|
||||||
|
ImageView iconFlag;
|
||||||
|
@Bind(R.id.icon_rate)
|
||||||
|
ImageView iconRate;
|
||||||
|
@Bind(R.id.icon_donate)
|
||||||
|
ImageView iconDonate;
|
||||||
|
@Bind(R.id.icon_author)
|
||||||
|
ImageView iconAuthor;
|
||||||
|
@Bind(R.id.icon_google_plus)
|
||||||
|
ImageView iconGooglePlus;
|
||||||
|
@Bind(R.id.icon_twitter)
|
||||||
|
ImageView iconTwitter;
|
||||||
|
@Bind(R.id.icon_github)
|
||||||
|
ImageView iconGithub;
|
||||||
|
@Bind(R.id.icon_website)
|
||||||
|
ImageView iconWebsite;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
@ -100,6 +128,7 @@ public class AboutActivity extends AbsBaseActivity implements View.OnClickListen
|
||||||
private void setUpViews() {
|
private void setUpViews() {
|
||||||
setUpToolbar();
|
setUpToolbar();
|
||||||
setUpAppVersion();
|
setUpAppVersion();
|
||||||
|
setUpIconTint();
|
||||||
setUpOnClickListeners();
|
setUpOnClickListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -133,6 +162,21 @@ public class AboutActivity extends AbsBaseActivity implements View.OnClickListen
|
||||||
aleksandarTesicGooglePlus.setOnClickListener(this);
|
aleksandarTesicGooglePlus.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setUpIconTint() {
|
||||||
|
iconInfo.setColorFilter(ColorUtil.resolveColor(this, android.R.attr.textColorSecondary));
|
||||||
|
iconChangelog.setColorFilter(ColorUtil.resolveColor(this, android.R.attr.textColorSecondary));
|
||||||
|
iconBugReport.setColorFilter(ColorUtil.resolveColor(this, android.R.attr.textColorSecondary));
|
||||||
|
iconGooglePlusCommunity.setColorFilter(ColorUtil.resolveColor(this, android.R.attr.textColorSecondary));
|
||||||
|
iconFlag.setColorFilter(ColorUtil.resolveColor(this, android.R.attr.textColorSecondary));
|
||||||
|
iconRate.setColorFilter(ColorUtil.resolveColor(this, android.R.attr.textColorSecondary));
|
||||||
|
iconDonate.setColorFilter(ColorUtil.resolveColor(this, android.R.attr.textColorSecondary));
|
||||||
|
iconAuthor.setColorFilter(ColorUtil.resolveColor(this, android.R.attr.textColorSecondary));
|
||||||
|
iconGooglePlus.setColorFilter(ColorUtil.resolveColor(this, android.R.attr.textColorSecondary));
|
||||||
|
iconTwitter.setColorFilter(ColorUtil.resolveColor(this, android.R.attr.textColorSecondary));
|
||||||
|
iconGithub.setColorFilter(ColorUtil.resolveColor(this, android.R.attr.textColorSecondary));
|
||||||
|
iconWebsite.setColorFilter(ColorUtil.resolveColor(this, android.R.attr.textColorSecondary));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||||
if (item.getItemId() == android.R.id.home) {
|
if (item.getItemId() == android.R.id.home) {
|
||||||
|
|
|
||||||
|
|
@ -49,11 +49,12 @@
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<android.support.v7.internal.widget.TintImageView
|
<ImageView
|
||||||
|
android:id="@+id/icon_info"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_info_outline_white_24dp"
|
android:src="@drawable/ic_info_outline_white_24dp"
|
||||||
android:tint="?android:textColorSecondary" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -93,11 +94,12 @@
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<android.support.v7.internal.widget.TintImageView
|
<ImageView
|
||||||
|
android:id="@+id/icon_changelog"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_history_white_24dp"
|
android:src="@drawable/ic_history_white_24dp"
|
||||||
android:tint="?android:textColorSecondary" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
|
@ -35,11 +36,12 @@
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<android.support.v7.internal.widget.TintImageView
|
<ImageView
|
||||||
|
android:id="@+id/icon_author"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_person_white_24dp"
|
android:src="@drawable/ic_person_white_24dp"
|
||||||
android:tint="?android:textColorSecondary" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -77,11 +79,12 @@
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<android.support.v7.internal.widget.TintImageView
|
<ImageView
|
||||||
|
android:id="@+id/icon_google_plus"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_google_plus_box_white_24dp"
|
android:src="@drawable/ic_google_plus_box_white_24dp"
|
||||||
android:tint="?android:textColorSecondary" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
@ -107,11 +110,12 @@
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<android.support.v7.internal.widget.TintImageView
|
<ImageView
|
||||||
|
android:id="@+id/icon_twitter"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_twitter_box_white_24dp"
|
android:src="@drawable/ic_twitter_box_white_24dp"
|
||||||
android:tint="?android:textColorSecondary" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
@ -137,11 +141,12 @@
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<android.support.v7.internal.widget.TintImageView
|
<ImageView
|
||||||
|
android:id="@+id/icon_github"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_github_circle_white_24dp"
|
android:src="@drawable/ic_github_circle_white_24dp"
|
||||||
android:tint="?android:textColorSecondary" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
@ -167,11 +172,12 @@
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<android.support.v7.internal.widget.TintImageView
|
<ImageView
|
||||||
|
android:id="@+id/icon_website"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_web_white_24dp"
|
android:src="@drawable/ic_web_white_24dp"
|
||||||
android:tint="?android:textColorSecondary" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:cardBackgroundColor="?cardBackgroundColor"
|
app:cardBackgroundColor="?cardBackgroundColor"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
|
@ -36,11 +37,12 @@
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<android.support.v7.internal.widget.TintImageView
|
<ImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_bug_report_white_24dp"
|
android:src="@drawable/ic_bug_report_white_24dp"
|
||||||
android:tint="?android:textColorSecondary" />
|
android:id="@+id/icon_bug_report"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -78,11 +80,12 @@
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<android.support.v7.internal.widget.TintImageView
|
<ImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_google_plus_box_white_24dp"
|
android:src="@drawable/ic_google_plus_box_white_24dp"
|
||||||
android:tint="?android:textColorSecondary" />
|
android:id="@+id/icon_google_plus_community"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -120,11 +123,12 @@
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<android.support.v7.internal.widget.TintImageView
|
<ImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_flag_white_24dp"
|
android:src="@drawable/ic_flag_white_24dp"
|
||||||
android:tint="?android:textColorSecondary" />
|
android:id="@+id/icon_flag"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -162,11 +166,12 @@
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<android.support.v7.internal.widget.TintImageView
|
<ImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_play_shopping_bag_white_24dp"
|
android:src="@drawable/ic_play_shopping_bag_white_24dp"
|
||||||
android:tint="?android:textColorSecondary" />
|
android:id="@+id/icon_rate"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -204,11 +209,12 @@
|
||||||
android:paddingLeft="16dp"
|
android:paddingLeft="16dp"
|
||||||
android:paddingRight="16dp">
|
android:paddingRight="16dp">
|
||||||
|
|
||||||
<android.support.v7.internal.widget.TintImageView
|
<ImageView
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:src="@drawable/ic_attach_money_white_24dp"
|
android:src="@drawable/ic_attach_money_white_24dp"
|
||||||
android:tint="?android:textColorSecondary" />
|
android:id="@+id/icon_donate"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
android:textCursorDrawable="@null"
|
android:textCursorDrawable="@null"
|
||||||
tools:ignore="RtlHardcoded" />
|
tools:ignore="RtlHardcoded" />
|
||||||
|
|
||||||
<android.support.v7.internal.widget.TintImageView
|
<ImageView
|
||||||
android:id="@+id/search_close_btn"
|
android:id="@+id/search_close_btn"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue