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:
@@ -81,6 +81,12 @@ public class DataEntryActivity extends Activity {
|
||||
|
||||
@Override
|
||||
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);
|
||||
|
||||
setContentView(R.layout.activity_dataentry);
|
||||
|
@@ -185,14 +185,7 @@ public abstract class MeasurementView extends TableLayout {
|
||||
valueView.setGravity(Gravity.RIGHT | Gravity.CENTER);
|
||||
|
||||
if (!isEditable()) {
|
||||
// if measurement is not editable, darken the icon color
|
||||
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);
|
||||
editModeView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
showEvaluatorRow(false);
|
||||
|
Reference in New Issue
Block a user