mirror of https://github.com/tuskyapp/Tusky.git
Browse Source
I tried to find a balance between going fully M3 and keeping some of the original Tusky feeling. For example, I removed the "allCaps" setting we had on most buttons, which is recommended for M3. On the other hand, I made them less rounded than the M3 default. <img src="https://github.com/user-attachments/assets/9d2485e0-7d1d-42ab-8a4e-c30d044aa5dc" width="320"/> <img src="https://github.com/user-attachments/assets/d65d3c91-afe9-424e-92d7-e0f3e401ea4b" width="320"/> <img src="https://github.com/user-attachments/assets/d5634440-c507-4484-a11e-983f47cbeab7" width="320"/>pull/4672/head
94 changed files with 575 additions and 487 deletions
@ -0,0 +1,11 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<!-- Disabled --> |
||||
<item android:color="@android:color/transparent" android:state_enabled="false"/> |
||||
|
||||
<!-- Selected --> |
||||
<item android:color="?attr/colorPrimary" android:alpha="0.4" android:state_selected="true"/> |
||||
<item android:color="?attr/colorPrimary" android:alpha="0.4" android:state_checked="true"/> |
||||
|
||||
<!-- Not selected --> |
||||
<item android:color="?attr/colorSurface" /> |
||||
</selector> |
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<corners android:radius="8dp" /> |
||||
<corners android:radius="16dp" /> |
||||
<solid android:color="?android:attr/colorBackground" /> |
||||
</shape> |
||||
</shape> |
||||
|
||||
@ -1,64 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto"> |
||||
android:paddingLeft="20dp" |
||||
android:paddingTop="16dp" |
||||
android:paddingRight="20dp"> |
||||
|
||||
<EditText |
||||
android:id="@+id/nameText" |
||||
<com.google.android.material.textfield.TextInputLayout |
||||
android:id="@+id/nameTextLayout" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="8dp" |
||||
android:layout_marginStart="8dp" |
||||
android:layout_marginEnd="8dp" |
||||
android:layout_marginBottom="0dp" |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
android:inputType="text" |
||||
android:hint="@string/hint_list_name" |
||||
android:importantForAutofill="no" |
||||
/> |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent"> |
||||
|
||||
<CheckBox |
||||
<com.google.android.material.textfield.TextInputEditText |
||||
android:id="@+id/nameText" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:importantForAutofill="no" |
||||
android:inputType="text" /> |
||||
|
||||
</com.google.android.material.textfield.TextInputLayout> |
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox |
||||
android:id="@+id/exclusiveCheckbox" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="0dp" |
||||
android:layout_marginStart="8dp" |
||||
android:layout_marginEnd="8dp" |
||||
android:layout_marginBottom="0dp" |
||||
app:layout_constraintTop_toBottomOf="@id/nameText" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
android:layout_marginTop="16dp" |
||||
android:text="@string/list_exclusive_label" |
||||
/> |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toBottomOf="@id/nameTextLayout" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/replyPolicyLabel" |
||||
<com.google.android.material.textfield.TextInputLayout |
||||
android:id="@+id/replyPolicyInputLayout" |
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
app:layout_constraintTop_toBottomOf="@id/exclusiveCheckbox" |
||||
android:layout_marginTop="16dp" |
||||
android:hint="@string/list_reply_policy_label" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintEnd_toEndOf="parent" |
||||
android:layout_marginTop="8dp" |
||||
android:layout_marginStart="8dp" |
||||
android:layout_marginEnd="8dp" |
||||
android:layout_marginBottom="0dp" |
||||
android:text="@string/list_reply_policy_label" |
||||
/> |
||||
app:layout_constraintTop_toBottomOf="@id/exclusiveCheckbox"> |
||||
|
||||
<Spinner |
||||
android:id="@+id/replyPolicySpinner" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
app:layout_constraintTop_toBottomOf="@id/replyPolicyLabel" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
android:layout_marginTop="0dp" |
||||
android:layout_marginStart="8dp" |
||||
android:layout_marginEnd="8dp" |
||||
android:layout_marginBottom="0dp" |
||||
android:entries="@array/list_reply_policies_display" |
||||
/> |
||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView |
||||
android:id="@+id/replyPolicyDropDown" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:inputType="none" /> |
||||
|
||||
</com.google.android.material.textfield.TextInputLayout> |
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
||||
|
||||
@ -1,37 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
xmlns:tools="http://schemas.android.com/tools" |
||||
android:layout_height="match_parent" |
||||
android:layout_width="match_parent" |
||||
android:orientation="vertical" |
||||
android:paddingTop="20dp" |
||||
android:paddingLeft="20dp" |
||||
android:paddingRight="20dp"> |
||||
|
||||
<TextView android:id="@+id/warning" |
||||
android:layout_height="wrap_content" |
||||
android:layout_width="wrap_content" |
||||
android:paddingBottom="20dp" |
||||
tools:text="@string/dialog_mute_warning"/> |
||||
|
||||
<CheckBox android:id="@+id/checkbox" |
||||
android:layout_height="wrap_content" |
||||
android:layout_width="wrap_content" |
||||
android:textColor="@color/textColorTertiary" |
||||
app:buttonTint="@color/compound_button_color" |
||||
android:text="@string/dialog_mute_hide_notifications"/> |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
xmlns:tools="http://schemas.android.com/tools" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:orientation="vertical" |
||||
android:paddingLeft="20dp" |
||||
android:paddingTop="20dp" |
||||
android:paddingRight="20dp"> |
||||
|
||||
<TextView |
||||
android:id="@+id/warning" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:paddingBottom="20dp" |
||||
tools:text="@string/dialog_mute_warning" /> |
||||
|
||||
<CheckBox |
||||
android:id="@+id/checkbox" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:paddingTop="20dp" |
||||
android:text="@string/label_duration" /> |
||||
android:text="@string/dialog_mute_hide_notifications" |
||||
android:textColor="@color/textColorTertiary" |
||||
app:buttonTint="@color/compound_button_color" /> |
||||
|
||||
<Spinner |
||||
android:id="@+id/duration" |
||||
android:entries="@array/mute_duration_names" |
||||
<com.google.android.material.textfield.TextInputLayout |
||||
android:id="@+id/durationInputLayout" |
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" /> |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="16dp" |
||||
android:hint="@string/label_duration"> |
||||
|
||||
<com.google.android.material.textfield.MaterialAutoCompleteTextView |
||||
android:id="@+id/durationDropDown" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:inputType="none" /> |
||||
|
||||
</com.google.android.material.textfield.TextInputLayout> |
||||
|
||||
</LinearLayout> |
||||
|
||||
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<!-- Derived from https://github.com/androidx/androidx/blob/8cb282cc/preference/preference/res/layout/preference_widget_switch_compat.xml --> |
||||
<com.google.android.material.materialswitch.MaterialSwitch xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:id="@+id/switchWidget" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:background="@null" |
||||
android:clickable="false" |
||||
android:focusable="false" /> |
||||
@ -1,16 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<com.google.android.material.appbar.AppBarLayout |
||||
xmlns:android="http://schemas.android.com/apk/res/android" |
||||
<com.google.android.material.appbar.AppBarLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
android:id="@+id/appbar" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:elevation="@dimen/actionbar_elevation" |
||||
app:layout_collapseMode="pin"> |
||||
app:liftOnScroll="false"> |
||||
|
||||
<androidx.appcompat.widget.Toolbar |
||||
<com.google.android.material.appbar.MaterialToolbar |
||||
android:id="@+id/toolbar" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="?attr/actionBarSize" /> |
||||
android:layout_height="wrap_content" |
||||
android:minHeight="?attr/actionBarSize" /> |
||||
|
||||
</com.google.android.material.appbar.AppBarLayout> |
||||
|
||||
Loading…
Reference in new issue