1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-22 06:37:30 +00:00

Remove 'Disable animation' from Posts layout preferences as it is not used

This commit is contained in:
Ammar Githam 2021-07-04 02:57:42 +09:00
parent a41d2a2f73
commit 55e9b17563
2 changed files with 13 additions and 45 deletions

View File

@ -80,7 +80,6 @@ public class PostsLayoutPreferencesDialogFragment extends DialogFragment {
initAvatarsToggle(); initAvatarsToggle();
initCornersToggle(); initCornersToggle();
initGapToggle(); initGapToggle();
initAnimationDisableToggle();
} }
private void initLayoutToggle() { private void initLayoutToggle() {
@ -170,11 +169,6 @@ public class PostsLayoutPreferencesDialogFragment extends DialogFragment {
binding.showGapToggle.setOnCheckedChangeListener((buttonView, isChecked) -> preferencesBuilder.setHasGap(isChecked)); binding.showGapToggle.setOnCheckedChangeListener((buttonView, isChecked) -> preferencesBuilder.setHasGap(isChecked));
} }
private void initAnimationDisableToggle() {
binding.disableAnimationToggle.setChecked(preferencesBuilder.isAnimationDisabled());
binding.disableAnimationToggle.setOnCheckedChangeListener((buttonView, isChecked) -> preferencesBuilder.setAnimationDisabled(isChecked));
}
private int getSelectedLayoutId() { private int getSelectedLayoutId() {
switch (preferencesBuilder.getType()) { switch (preferencesBuilder.getType()) {
case STAGGERED_GRID: case STAGGERED_GRID:

View File

@ -23,8 +23,8 @@
android:id="@+id/label_layout" android:id="@+id/label_layout"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="6dp"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginRight="6dp"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:gravity="right" android:gravity="right"
android:text="@string/layout_style" android:text="@string/layout_style"
@ -74,14 +74,14 @@
android:id="@+id/label_col_count" android:id="@+id/label_col_count"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="6dp"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginRight="6dp"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:gravity="right" android:gravity="right"
android:text="@string/column_count" android:text="@string/column_count"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="@id/col_count_toggle" app:layout_constraintBottom_toBottomOf="@id/col_count_toggle"
app:layout_constraintEnd_toStartOf="@id/guideline" app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/col_count_toggle" /> app:layout_constraintTop_toTopOf="@id/col_count_toggle" />
<com.google.android.material.button.MaterialButtonToggleGroup <com.google.android.material.button.MaterialButtonToggleGroup
@ -116,8 +116,8 @@
android:id="@+id/label_show_names_toggle" android:id="@+id/label_show_names_toggle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="6dp"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginRight="6dp"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:gravity="right" android:gravity="right"
android:text="@string/show_names" android:text="@string/show_names"
@ -142,14 +142,14 @@
android:id="@+id/label_show_avatar_toggle" android:id="@+id/label_show_avatar_toggle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="6dp"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginRight="6dp"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:gravity="right" android:gravity="right"
android:text="@string/show_avatars" android:text="@string/show_avatars"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="@id/show_avatar_toggle" app:layout_constraintBottom_toBottomOf="@id/show_avatar_toggle"
app:layout_constraintEnd_toStartOf="@id/guideline" app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/show_avatar_toggle" /> app:layout_constraintTop_toTopOf="@id/show_avatar_toggle" />
<com.google.android.material.switchmaterial.SwitchMaterial <com.google.android.material.switchmaterial.SwitchMaterial
@ -168,14 +168,14 @@
android:id="@+id/label_avatar_size" android:id="@+id/label_avatar_size"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="6dp"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginRight="6dp"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:gravity="right" android:gravity="right"
android:text="@string/avatar_size" android:text="@string/avatar_size"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="@id/avatar_size_toggle" app:layout_constraintBottom_toBottomOf="@id/avatar_size_toggle"
app:layout_constraintEnd_toStartOf="@id/guideline" app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/avatar_size_toggle" /> app:layout_constraintTop_toTopOf="@id/avatar_size_toggle" />
<com.google.android.material.button.MaterialButtonToggleGroup <com.google.android.material.button.MaterialButtonToggleGroup
@ -217,14 +217,14 @@
android:id="@+id/label_corners" android:id="@+id/label_corners"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="6dp"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginRight="6dp"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:gravity="right" android:gravity="right"
android:text="@string/corners" android:text="@string/corners"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="@id/corners_toggle" app:layout_constraintBottom_toBottomOf="@id/corners_toggle"
app:layout_constraintEnd_toStartOf="@id/guideline" app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/corners_toggle" /> app:layout_constraintTop_toTopOf="@id/corners_toggle" />
<com.google.android.material.button.MaterialButtonToggleGroup <com.google.android.material.button.MaterialButtonToggleGroup
@ -259,14 +259,14 @@
android:id="@+id/label_gap" android:id="@+id/label_gap"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="6dp"
android:layout_marginTop="4dp" android:layout_marginTop="4dp"
android:layout_marginRight="6dp"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:gravity="right" android:gravity="right"
android:text="@string/show_grid_gap" android:text="@string/show_grid_gap"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="@id/show_gap_toggle" app:layout_constraintBottom_toBottomOf="@id/show_gap_toggle"
app:layout_constraintEnd_toStartOf="@id/guideline" app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/show_gap_toggle" /> app:layout_constraintTop_toTopOf="@id/show_gap_toggle" />
<com.google.android.material.switchmaterial.SwitchMaterial <com.google.android.material.switchmaterial.SwitchMaterial
@ -274,39 +274,13 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:checked="true" android:checked="true"
app:layout_constraintBottom_toTopOf="@id/disable_animation_toggle" app:layout_constraintBottom_toTopOf="@id/show_gap_toggle"
app:layout_constraintStart_toEndOf="@id/guideline" app:layout_constraintStart_toEndOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@id/corners_toggle" app:layout_constraintTop_toBottomOf="@id/corners_toggle"
app:showText="false" app:showText="false"
app:switchPadding="0dp" app:switchPadding="0dp"
app:thumbTextPadding="0dp" /> app:thumbTextPadding="0dp" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/label_disable_animation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="6dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:gravity="right"
android:text="@string/disable_animation"
android:layout_gravity="right"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="@id/disable_animation_toggle"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toTopOf="@id/disable_animation_toggle" />
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/disable_animation_toggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
app:layout_constraintStart_toEndOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@id/show_gap_toggle"
app:showText="false"
app:switchPadding="0dp"
app:thumbTextPadding="0dp" />
<androidx.constraintlayout.widget.Group <androidx.constraintlayout.widget.Group
android:id="@+id/staggered_or_grid_options" android:id="@+id/staggered_or_grid_options"
android:layout_width="wrap_content" android:layout_width="wrap_content"