Fix calendar
This commit is contained in:
parent
9a10a7aaf6
commit
1dbf3a050c
|
@ -23,6 +23,8 @@ import androidx.multidex.MultiDex;
|
||||||
import androidx.multidex.MultiDexApplication;
|
import androidx.multidex.MultiDexApplication;
|
||||||
import androidx.preference.PreferenceManager;
|
import androidx.preference.PreferenceManager;
|
||||||
|
|
||||||
|
import com.google.android.material.color.DynamicColors;
|
||||||
|
|
||||||
import org.acra.ACRA;
|
import org.acra.ACRA;
|
||||||
import org.acra.ReportField;
|
import org.acra.ReportField;
|
||||||
import org.acra.config.CoreConfigurationBuilder;
|
import org.acra.config.CoreConfigurationBuilder;
|
||||||
|
@ -43,12 +45,30 @@ public class MainApplication extends MultiDexApplication {
|
||||||
return app;
|
return app;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final int[] HARMONIZED_MATERIAL_ATTRIBUTES =
|
||||||
|
new int[]{
|
||||||
|
R.attr.colorOnPrimary,
|
||||||
|
R.attr.colorPrimaryContainer,
|
||||||
|
R.attr.colorError,
|
||||||
|
R.attr.colorOnError,
|
||||||
|
R.attr.colorErrorContainer,
|
||||||
|
R.attr.colorOnErrorContainer
|
||||||
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
app = this;
|
app = this;
|
||||||
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(MainApplication.this);
|
SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(MainApplication.this);
|
||||||
|
|
||||||
|
DynamicColors.applyToActivitiesIfAvailable(this);
|
||||||
|
|
||||||
|
/* HarmonizedColorsOptions options =
|
||||||
|
new HarmonizedColorsOptions.Builder()
|
||||||
|
.setColorAttributes(HarmonizedColorAttributes.create(HARMONIZED_MATERIAL_ATTRIBUTES))
|
||||||
|
.setColorAttributeToHarmonizeWith(R.attr.colorAccent)
|
||||||
|
.build();
|
||||||
|
HarmonizedColors.applyToContextIfAvailable(this, options);*/
|
||||||
|
|
||||||
boolean custom_theme = sharedpreferences.getBoolean("use_custom_theme", false);
|
boolean custom_theme = sharedpreferences.getBoolean("use_custom_theme", false);
|
||||||
boolean no_theme_set = sharedpreferences.getBoolean("no_theme_set", true);
|
boolean no_theme_set = sharedpreferences.getBoolean("no_theme_set", true);
|
||||||
|
|
|
@ -57,43 +57,52 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier_date_time_bottom" />
|
app:layout_constraintTop_toBottomOf="@id/barrier_date_time_bottom" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/date_time_previous"
|
android:id="@+id/date_time_previous"
|
||||||
style="@style/Widget.AppCompat.Button.Colored"
|
style="@style/Widget.Material3.Button.Icon"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:contentDescription="@string/previous"
|
android:contentDescription="@string/previous"
|
||||||
android:src="@drawable/ic_baseline_skip_previous_24"
|
android:padding="0dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
app:icon="@drawable/ic_baseline_skip_previous_24"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
app:iconPadding="0dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/date_time_next"
|
app:layout_constraintEnd_toStartOf="@id/date_time_next"
|
||||||
app:layout_constraintHorizontal_chainStyle="packed"
|
app:layout_constraintHorizontal_chainStyle="packed"
|
||||||
app:layout_constraintStart_toEndOf="@id/date_time_cancel"
|
app:layout_constraintStart_toEndOf="@id/date_time_cancel"
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier_date_time_bottom" />
|
app:layout_constraintTop_toBottomOf="@id/barrier_date_time_bottom" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/date_time_next"
|
android:id="@+id/date_time_next"
|
||||||
style="@style/Widget.AppCompat.Button.Colored"
|
style="@style/Widget.Material3.Button.Icon"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:contentDescription="@string/next"
|
android:contentDescription="@string/next"
|
||||||
android:src="@drawable/ic_baseline_skip_next_24"
|
android:padding="0dp"
|
||||||
|
app:icon="@drawable/ic_baseline_skip_next_24"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
app:iconPadding="0dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/date_time_set"
|
app:layout_constraintEnd_toStartOf="@id/date_time_set"
|
||||||
app:layout_constraintHorizontal_chainStyle="packed"
|
app:layout_constraintHorizontal_chainStyle="packed"
|
||||||
app:layout_constraintStart_toEndOf="@id/date_time_previous"
|
app:layout_constraintStart_toEndOf="@id/date_time_previous"
|
||||||
app:layout_constraintTop_toBottomOf="@id/barrier_date_time_bottom" />
|
app:layout_constraintTop_toBottomOf="@id/barrier_date_time_bottom" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/date_time_set"
|
android:id="@+id/date_time_set"
|
||||||
style="@style/Widget.AppCompat.Button.Colored"
|
style="@style/Widget.Material3.Button.Icon"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:contentDescription="@string/validate"
|
android:contentDescription="@string/validate"
|
||||||
android:src="@drawable/ic_baseline_check_24"
|
android:padding="0dp"
|
||||||
|
app:icon="@drawable/ic_baseline_check_24"
|
||||||
|
app:iconGravity="textStart"
|
||||||
|
app:iconPadding="0dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
Loading…
Reference in New Issue