mirror of
https://github.com/gsantner/dandelion
synced 2024-11-10 14:36:01 +01:00
Replaced setTextColor on Buttons with new ThemeHelper method
This commit is contained in:
parent
1db57bd957
commit
d0a541bc34
3 changed files with 15 additions and 7 deletions
|
@ -192,10 +192,10 @@ public class AboutActivity extends ThemedActivity
|
||||||
protected void applyColorToViews() {
|
protected void applyColorToViews() {
|
||||||
ThemeHelper.getInstance(getAppSettings());
|
ThemeHelper.getInstance(getAppSettings());
|
||||||
ThemeHelper.updateTextViewLinkColor(spreadText);
|
ThemeHelper.updateTextViewLinkColor(spreadText);
|
||||||
contributeBtn.setTextColor(ThemeHelper.getAccentColor());
|
ThemeHelper.updateButtonTextColor(contributeBtn);
|
||||||
feedbackBtn.setTextColor(ThemeHelper.getAccentColor());
|
ThemeHelper.updateButtonTextColor(feedbackBtn);
|
||||||
spreadBtn.setTextColor(ThemeHelper.getAccentColor());
|
ThemeHelper.updateButtonTextColor(spreadBtn);
|
||||||
translateBtn.setTextColor(ThemeHelper.getAccentColor());
|
ThemeHelper.updateButtonTextColor(translateBtn);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -311,8 +311,8 @@ public class AboutActivity extends ThemedActivity
|
||||||
@Override
|
@Override
|
||||||
protected void applyColorToViews() {
|
protected void applyColorToViews() {
|
||||||
ThemeHelper.getInstance(getAppSettings());
|
ThemeHelper.getInstance(getAppSettings());
|
||||||
leafpicBtn.setTextColor(ThemeHelper.getAccentColor());
|
ThemeHelper.updateButtonTextColor(leafpicBtn);
|
||||||
licenseBtn.setTextColor(ThemeHelper.getAccentColor());
|
ThemeHelper.updateButtonTextColor(licenseBtn);
|
||||||
ThemeHelper.updateTextViewLinkColor(maintainers);
|
ThemeHelper.updateTextViewLinkColor(maintainers);
|
||||||
ThemeHelper.updateTextViewLinkColor(thirdPartyLibs);
|
ThemeHelper.updateTextViewLinkColor(thirdPartyLibs);
|
||||||
}
|
}
|
||||||
|
@ -440,7 +440,7 @@ public class AboutActivity extends ThemedActivity
|
||||||
return new AboutFragment();
|
return new AboutFragment();
|
||||||
case 1: //License
|
case 1: //License
|
||||||
return new LicenseFragment();
|
return new LicenseFragment();
|
||||||
case 3: //Debug
|
case 2: //Debug
|
||||||
default:
|
default:
|
||||||
return new DebugFragment();
|
return new DebugFragment();
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ import android.support.customtabs.CustomTabsSession;
|
||||||
import android.support.design.widget.AppBarLayout;
|
import android.support.design.widget.AppBarLayout;
|
||||||
import android.support.design.widget.NavigationView;
|
import android.support.design.widget.NavigationView;
|
||||||
import android.support.design.widget.Snackbar;
|
import android.support.design.widget.Snackbar;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import android.support.v4.content.LocalBroadcastManager;
|
import android.support.v4.content.LocalBroadcastManager;
|
||||||
import android.support.v4.view.GravityCompat;
|
import android.support.v4.view.GravityCompat;
|
||||||
|
@ -763,6 +764,7 @@ public class MainActivity extends ThemedActivity
|
||||||
|
|
||||||
View layout = getLayoutInflater().inflate(R.layout.ui__dialog_search__people_tags, null, false);
|
View layout = getLayoutInflater().inflate(R.layout.ui__dialog_search__people_tags, null, false);
|
||||||
final EditText input = (EditText) layout.findViewById(R.id.dialog_search__input);
|
final EditText input = (EditText) layout.findViewById(R.id.dialog_search__input);
|
||||||
|
ThemeHelper.updateEditTextColor(input);
|
||||||
final DialogInterface.OnClickListener clickListener = new DialogInterface.OnClickListener() {
|
final DialogInterface.OnClickListener clickListener = new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialogInterface, int which) {
|
public void onClick(DialogInterface dialogInterface, int which) {
|
||||||
|
|
|
@ -171,4 +171,10 @@ public class ThemeHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void updateButtonTextColor(Button button) {
|
||||||
|
if (button != null) {
|
||||||
|
button.setTextColor(getAccentColor());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue