mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 04:12:08 +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() {
|
||||
ThemeHelper.getInstance(getAppSettings());
|
||||
ThemeHelper.updateTextViewLinkColor(spreadText);
|
||||
contributeBtn.setTextColor(ThemeHelper.getAccentColor());
|
||||
feedbackBtn.setTextColor(ThemeHelper.getAccentColor());
|
||||
spreadBtn.setTextColor(ThemeHelper.getAccentColor());
|
||||
translateBtn.setTextColor(ThemeHelper.getAccentColor());
|
||||
ThemeHelper.updateButtonTextColor(contributeBtn);
|
||||
ThemeHelper.updateButtonTextColor(feedbackBtn);
|
||||
ThemeHelper.updateButtonTextColor(spreadBtn);
|
||||
ThemeHelper.updateButtonTextColor(translateBtn);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -311,8 +311,8 @@ public class AboutActivity extends ThemedActivity
|
|||
@Override
|
||||
protected void applyColorToViews() {
|
||||
ThemeHelper.getInstance(getAppSettings());
|
||||
leafpicBtn.setTextColor(ThemeHelper.getAccentColor());
|
||||
licenseBtn.setTextColor(ThemeHelper.getAccentColor());
|
||||
ThemeHelper.updateButtonTextColor(leafpicBtn);
|
||||
ThemeHelper.updateButtonTextColor(licenseBtn);
|
||||
ThemeHelper.updateTextViewLinkColor(maintainers);
|
||||
ThemeHelper.updateTextViewLinkColor(thirdPartyLibs);
|
||||
}
|
||||
|
@ -440,7 +440,7 @@ public class AboutActivity extends ThemedActivity
|
|||
return new AboutFragment();
|
||||
case 1: //License
|
||||
return new LicenseFragment();
|
||||
case 3: //Debug
|
||||
case 2: //Debug
|
||||
default:
|
||||
return new DebugFragment();
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ import android.support.customtabs.CustomTabsSession;
|
|||
import android.support.design.widget.AppBarLayout;
|
||||
import android.support.design.widget.NavigationView;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
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);
|
||||
final EditText input = (EditText) layout.findViewById(R.id.dialog_search__input);
|
||||
ThemeHelper.updateEditTextColor(input);
|
||||
final DialogInterface.OnClickListener clickListener = new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
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