-
Notifications
You must be signed in to change notification settings - Fork 45
Set max width to fragments #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
8e3484e
Add max width constraint to fragment_server
doromaraujo a494abd
Make fragment_server scrollable if necessary
doromaraujo 18ad502
Make dialog_confirm_change_server scrollable
doromaraujo 4dd017d
Set max width on ConfirmChangeServerDialog
doromaraujo ac4e4f7
Set rounded corner radius for dialogs to 16dp
doromaraujo a02ef79
Set rounded corner radius for dialogs to 28dp
doromaraujo 4238aad
Use AlertDialogTheme in ChangeServerFragment dialogs
doromaraujo f7350fb
Center text used in dialog_simple_alert_message
doromaraujo 3995d91
Add default margin values for dialogs
doromaraujo ad63463
Add max width and center_horizontal to Advanced fragment
doromaraujo c8f35b4
Add max width and center_horizontal to Profiles fragment
doromaraujo 9d4a090
Use wrap_content on ScrollView's layout_height
doromaraujo 9a17655
Remove unused method to calculate max width on dialogs
doromaraujo 2f125a4
Add fragment_max_width to dimens.xml
doromaraujo 743f45b
Add missing contentDescription to Use Netbird server button
doromaraujo db4caef
Add dialog max width to dimensions file
doromaraujo a7b5a9b
Change ConstraintLayout in dialog files to be contained in LinearLayout
doromaraujo 105f324
Change ConstraintLayout in fragment_advanced to be contained in Linea…
doromaraujo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,4 +3,5 @@ | |
| android:shape="rectangle"> | ||
|
|
||
| <solid android:color="@color/nb_bg" /> | ||
| <corners android:radius="28dp" /> | ||
| </shape> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 57 additions & 48 deletions
105
app/src/main/res/layout/dialog_change_server_success.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,59 +1,68 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <androidx.constraintlayout.widget.ConstraintLayout | ||
| <LinearLayout | ||
| xmlns:android="http://schemas.android.com/apk/res/android" | ||
| xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| android:padding="24dp" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:background="@drawable/bg_rounded_white"> | ||
| android:paddingStart="@dimen/dialog_horizontal_margin" | ||
| android:paddingEnd="@dimen/dialog_horizontal_margin" | ||
| android:gravity="center_horizontal"> | ||
|
|
||
| <ImageView | ||
| android:id="@+id/icon_warning" | ||
| android:layout_width="28dp" | ||
| android:layout_height="28dp" | ||
| android:contentDescription="@string/change_server_success_icon" | ||
| android:src="@drawable/check" | ||
| android:layout_margin="30dp" | ||
| app:layout_constraintTop_toTopOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" /> | ||
|
|
||
| <TextView | ||
| android:id="@+id/text_title" | ||
| android:layout_width="0dp" | ||
| <androidx.constraintlayout.widget.ConstraintLayout | ||
| android:padding="24dp" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:text="@string/change_server_success_title" | ||
| android:textStyle="bold" | ||
| android:textSize="18sp" | ||
| android:textAlignment="center" | ||
| android:layout_marginTop="30dp" | ||
| app:layout_constraintTop_toBottomOf="@id/icon_warning" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" /> | ||
| android:maxWidth="@dimen/dialog_max_width" | ||
| android:background="@drawable/bg_rounded_white"> | ||
|
|
||
| <TextView | ||
| android:id="@+id/text_description" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="@string/change_server_success_desc" | ||
| android:textSize="14sp" | ||
| android:textAlignment="center" | ||
| android:layout_marginTop="8dp" | ||
| app:layout_constraintTop_toBottomOf="@id/text_title" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" /> | ||
| <ImageView | ||
| android:id="@+id/icon_warning" | ||
| android:layout_width="28dp" | ||
| android:layout_height="28dp" | ||
| android:contentDescription="@string/change_server_success_icon" | ||
| android:src="@drawable/check" | ||
| android:layout_margin="30dp" | ||
| app:layout_constraintTop_toTopOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" /> | ||
|
|
||
| <Button | ||
| android:id="@+id/btn_close" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="@android:string/ok" | ||
| android:textAllCaps="false" | ||
| app:layout_constraintTop_toBottomOf="@id/text_description" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| android:background="@drawable/btn_bg_orange" | ||
| android:layout_marginTop="24dp" /> | ||
| <TextView | ||
| android:id="@+id/text_title" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="@string/change_server_success_title" | ||
| android:textStyle="bold" | ||
| android:textSize="18sp" | ||
| android:textAlignment="center" | ||
| android:layout_marginTop="30dp" | ||
| app:layout_constraintTop_toBottomOf="@id/icon_warning" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" /> | ||
|
|
||
| <TextView | ||
| android:id="@+id/text_description" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="@string/change_server_success_desc" | ||
| android:textSize="14sp" | ||
| android:textAlignment="center" | ||
| android:layout_marginTop="8dp" | ||
| app:layout_constraintTop_toBottomOf="@id/text_title" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" /> | ||
|
|
||
| <Button | ||
| android:id="@+id/btn_close" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="@android:string/ok" | ||
| android:textAllCaps="false" | ||
| app:layout_constraintTop_toBottomOf="@id/text_description" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| android:background="@drawable/btn_bg_orange" | ||
| android:layout_marginTop="24dp" /> | ||
|
|
||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||
|
|
||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||
| </LinearLayout> | ||
151 changes: 85 additions & 66 deletions
151
app/src/main/res/layout/dialog_confirm_change_server.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,77 +1,96 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <androidx.constraintlayout.widget.ConstraintLayout | ||
| <ScrollView | ||
| xmlns:android="http://schemas.android.com/apk/res/android" | ||
| xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| android:padding="24dp" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:background="@drawable/bg_rounded_white"> | ||
| android:fillViewport="true" | ||
| android:paddingStart="@dimen/dialog_horizontal_margin" | ||
| android:paddingEnd="@dimen/dialog_horizontal_margin" | ||
| android:clipToPadding="false" | ||
| android:background="@android:color/transparent"> | ||
|
|
||
| <ImageView | ||
| android:id="@+id/icon_warning" | ||
| android:layout_width="28dp" | ||
| android:layout_height="28dp" | ||
| android:contentDescription="@string/desc_exclamation_mark" | ||
| android:src="@drawable/exclamation" | ||
| android:layout_margin="30dp" | ||
| app:layout_constraintTop_toTopOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" /> | ||
|
|
||
| <TextView | ||
| android:id="@+id/text_title" | ||
| android:layout_width="0dp" | ||
| <LinearLayout | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:text="@string/change_server_alert_title" | ||
| android:textStyle="bold" | ||
| android:textSize="18sp" | ||
| android:textAlignment="center" | ||
| android:layout_marginTop="30dp" | ||
| app:layout_constraintTop_toBottomOf="@id/icon_warning" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" /> | ||
| android:gravity="center_horizontal"> | ||
|
|
||
| <TextView | ||
| android:id="@+id/text_description" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="@string/change_server_alert_desc" | ||
| android:textSize="14sp" | ||
| android:textAlignment="center" | ||
| android:layout_marginTop="8dp" | ||
| app:layout_constraintTop_toBottomOf="@id/text_title" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" /> | ||
| <androidx.constraintlayout.widget.ConstraintLayout | ||
| android:padding="24dp" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:maxWidth="@dimen/dialog_max_width" | ||
| android:background="@drawable/bg_rounded_white"> | ||
doromaraujo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <Button | ||
| android:id="@+id/btn_yes" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="@string/change_server_alert_yes" | ||
| android:textAllCaps="false" | ||
| app:layout_constraintTop_toBottomOf="@id/text_description" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| android:background="@drawable/btn_bg_orange" | ||
| android:layout_marginTop="24dp" | ||
| android:focusable="true" | ||
| android:focusableInTouchMode="false" | ||
| android:foreground="@drawable/focus_highlight" /> | ||
| <ImageView | ||
| android:id="@+id/icon_warning" | ||
| android:layout_width="28dp" | ||
| android:layout_height="28dp" | ||
| android:contentDescription="@string/desc_exclamation_mark" | ||
| android:src="@drawable/exclamation" | ||
| android:layout_margin="30dp" | ||
| app:layout_constraintTop_toTopOf="parent" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" /> | ||
|
|
||
| <Button | ||
| android:id="@+id/btn_cancel" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="@string/change_server_alert_cancel" | ||
| android:textAllCaps="false" | ||
| android:textColor="@color/nb_orange" | ||
| android:background="@drawable/btn_bg_transparent" | ||
| app:layout_constraintTop_toBottomOf="@id/btn_yes" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| android:layout_marginTop="12dp" | ||
| android:focusable="true" | ||
| android:focusableInTouchMode="false" | ||
| android:foreground="@drawable/focus_highlight" /> | ||
| <TextView | ||
| android:id="@+id/text_title" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="@string/change_server_alert_title" | ||
| android:textStyle="bold" | ||
| android:textSize="18sp" | ||
| android:textAlignment="center" | ||
| android:layout_marginTop="30dp" | ||
| app:layout_constraintTop_toBottomOf="@id/icon_warning" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" /> | ||
|
|
||
| <TextView | ||
| android:id="@+id/text_description" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="@string/change_server_alert_desc" | ||
| android:textSize="14sp" | ||
| android:textAlignment="center" | ||
| android:layout_marginTop="8dp" | ||
| app:layout_constraintTop_toBottomOf="@id/text_title" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" /> | ||
|
|
||
| <Button | ||
| android:id="@+id/btn_yes" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="@string/change_server_alert_yes" | ||
| android:textAllCaps="false" | ||
| app:layout_constraintTop_toBottomOf="@id/text_description" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| android:background="@drawable/btn_bg_orange" | ||
| android:layout_marginTop="24dp" | ||
| android:focusable="true" | ||
| android:focusableInTouchMode="false" | ||
| android:foreground="@drawable/focus_highlight" /> | ||
|
|
||
| <Button | ||
| android:id="@+id/btn_cancel" | ||
| android:layout_width="0dp" | ||
| android:layout_height="wrap_content" | ||
| android:text="@string/change_server_alert_cancel" | ||
| android:textAllCaps="false" | ||
| android:textColor="@color/nb_orange" | ||
| android:background="@drawable/btn_bg_transparent" | ||
| app:layout_constraintTop_toBottomOf="@id/btn_yes" | ||
| app:layout_constraintStart_toStartOf="parent" | ||
| app:layout_constraintEnd_toEndOf="parent" | ||
| android:layout_marginTop="12dp" | ||
| android:focusable="true" | ||
| android:focusableInTouchMode="false" | ||
| android:foreground="@drawable/focus_highlight" /> | ||
|
|
||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||
|
|
||
| </LinearLayout> | ||
|
|
||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||
| </ScrollView> | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.