Archived
Added text fields to change colours for text and background, but background logic for that is not yet implemented. BUG: settings don't react as they should. Clicking on "serif," for example, doesn't actually select and store serif. What is going on?
This commit is contained in:
@@ -39,18 +39,21 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="4dp"/>
|
||||
|
||||
<!-- TODO the following 4 elements are hidden but must be removed once their features are implemented custom -->
|
||||
<com.denizd.textbasic.VerticalTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/text_opacity"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="@font/mono_light"
|
||||
android:visibility="gone"
|
||||
android:padding="4dp"/>
|
||||
|
||||
<NumberPicker
|
||||
android:id="@+id/text_transparency_picker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_marginHorizontal="4dp"/>
|
||||
|
||||
<com.denizd.textbasic.VerticalTextView
|
||||
@@ -59,12 +62,14 @@
|
||||
android:text="@string/bg_opacity"
|
||||
android:textSize="12sp"
|
||||
android:fontFamily="@font/mono_light"
|
||||
android:visibility="gone"
|
||||
android:padding="4dp"/>
|
||||
|
||||
<NumberPicker
|
||||
android:id="@+id/bg_transparency_picker"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_marginHorizontal="4dp"/>
|
||||
|
||||
<com.denizd.textbasic.VerticalTextView
|
||||
@@ -84,6 +89,7 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- TODO this must be replaced with a custom solution later -->
|
||||
<com.google.android.material.button.MaterialButtonToggleGroup
|
||||
android:id="@+id/typeface_toggle_button"
|
||||
android:layout_width="match_parent"
|
||||
@@ -122,21 +128,6 @@
|
||||
|
||||
</com.google.android.material.button.MaterialButtonToggleGroup>
|
||||
|
||||
<!-- <com.google.android.material.textfield.TextInputLayout-->
|
||||
<!-- style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"-->
|
||||
<!-- android:id="@+id/typeface_menu"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginBottom="16dp">-->
|
||||
|
||||
<!-- <AutoCompleteTextView-->
|
||||
<!-- android:id="@+id/typeface_menu_textview"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:inputType="none"/>-->
|
||||
|
||||
<!-- </com.google.android.material.textfield.TextInputLayout>-->
|
||||
|
||||
<com.google.android.material.button.MaterialButtonToggleGroup
|
||||
android:id="@+id/typeface_style_toggle_button"
|
||||
android:layout_width="match_parent"
|
||||
@@ -222,9 +213,102 @@
|
||||
|
||||
</com.google.android.material.button.MaterialButtonToggleGroup>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:id="@+id/text_layout_text_colour"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:maxLines="1"
|
||||
android:scrollHorizontally="true"
|
||||
android:hint="@string/text_colour_input_hint"
|
||||
app:boxStrokeColor="@color/selector_text_input"
|
||||
app:hintTextColor="@color/selector_text_input">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/ThemeOverlay.Material3.TextInputEditText.OutlinedBox"
|
||||
android:textColor="?attr/colorOnSurfaceVariant"
|
||||
android:maxLength="8"
|
||||
android:digits="abcdefABCDEF1234567890"
|
||||
android:id="@+id/edit_text_text_colour"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/preview_text_colour"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="@drawable/rounded_shape"
|
||||
android:backgroundTint="@color/design_default_color_primary"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:id="@+id/text_layout_bg_colour"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:maxLines="1"
|
||||
android:scrollHorizontally="true"
|
||||
android:hint="@string/bg_colour_input_hint"
|
||||
app:boxStrokeColor="@color/selector_text_input"
|
||||
app:hintTextColor="@color/selector_text_input">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
style="@style/ThemeOverlay.Material3.TextInputEditText.OutlinedBox"
|
||||
android:textColor="?attr/colorOnSurfaceVariant"
|
||||
android:maxLength="8"
|
||||
android:digits="abcdefABCDEF1234567890"
|
||||
android:id="@+id/edit_text_bg_colour"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/preview_bg_colour"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:background="@drawable/rounded_shape"
|
||||
android:backgroundTint="@color/design_default_color_primary"/>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- TODO this view is hidden but must be removed later -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -242,7 +326,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
<!-- android:textColor="?attr/colorOnPrimary"-->
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/switch_invert"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -273,7 +357,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/switch_random"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -336,7 +420,6 @@
|
||||
android:padding="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="12dp">
|
||||
<!-- android:backgroundTint="?attr/colorSecondary"-->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user