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
|
@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);
|
||||||
|
@@ -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);
|
||||||
|
Reference in New Issue
Block a user