1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-26 09:44:31 +02:00

update app theme for data entry activity.

This commit is contained in:
OliE
2018-01-28 15:36:59 +01:00
parent 2dc40e4bc4
commit 5aa9a45f5b
2 changed files with 7 additions and 8 deletions

View File

@@ -81,6 +81,12 @@ public class DataEntryActivity extends Activity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
String app_theme = PreferenceManager.getDefaultSharedPreferences(this).getString("app_theme", "Light");
if (app_theme.equals("Dark")) {
setTheme(R.style.AppTheme_Dark);
}
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dataentry); setContentView(R.layout.activity_dataentry);

View File

@@ -185,14 +185,7 @@ public abstract class MeasurementView extends TableLayout {
valueView.setGravity(Gravity.RIGHT | Gravity.CENTER); valueView.setGravity(Gravity.RIGHT | Gravity.CENTER);
if (!isEditable()) { if (!isEditable()) {
// if measurement is not editable, darken the icon color editModeView.setVisibility(View.GONE);
float[] hsv = new float[3];
int color = nameView.getCurrentTextColor();
Color.colorToHSV(color, hsv);
hsv[2] *= 0.4f; // value component
color = Color.HSVToColor(hsv);
editModeView.setColorFilter(color);
} }
showEvaluatorRow(false); showEvaluatorRow(false);