Fix calendar

This commit is contained in:
Thomas 2022-11-29 16:24:23 +01:00
parent 9a10a7aaf6
commit 1dbf3a050c
2 changed files with 38 additions and 9 deletions

View File

@ -23,6 +23,8 @@ import androidx.multidex.MultiDex;
import androidx.multidex.MultiDexApplication;
import androidx.preference.PreferenceManager;
import com.google.android.material.color.DynamicColors;
import org.acra.ACRA;
import org.acra.ReportField;
import org.acra.config.CoreConfigurationBuilder;
@ -43,12 +45,30 @@ public class MainApplication extends MultiDexApplication {
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
public void onCreate() {
super.onCreate();
app = 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 no_theme_set = sharedpreferences.getBoolean("no_theme_set", true);

View File

@ -57,43 +57,52 @@
app:layout_constraintStart_toStartOf="parent"
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"
style="@style/Widget.AppCompat.Button.Colored"
style="@style/Widget.Material3.Button.Icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_margin="10dp"
android:contentDescription="@string/previous"
android:src="@drawable/ic_baseline_skip_previous_24"
android:padding="0dp"
android:visibility="gone"
app:icon="@drawable/ic_baseline_skip_previous_24"
app:iconGravity="textStart"
app:iconPadding="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/date_time_next"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toEndOf="@id/date_time_cancel"
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"
style="@style/Widget.AppCompat.Button.Colored"
style="@style/Widget.Material3.Button.Icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_margin="10dp"
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_constraintEnd_toStartOf="@id/date_time_set"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toEndOf="@id/date_time_previous"
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"
style="@style/Widget.AppCompat.Button.Colored"
style="@style/Widget.Material3.Button.Icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_margin="10dp"
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"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"