-
Notifications
You must be signed in to change notification settings - Fork 625
Style gallery button for uploading custom screenshots #4598
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
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
6 changes: 6 additions & 0 deletions
6
firebase-appdistribution/src/main/res/drawable/btn_disabled_stroked.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> | ||
<solid android:color="#0D000000" /> | ||
<corners android:radius="8dp"/> | ||
<stroke android:width="1dp" android:color="#0F000000" /> | ||
</shape> |
6 changes: 6 additions & 0 deletions
6
firebase-appdistribution/src/main/res/drawable/btn_stroked.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> | ||
<solid android:color="#00000000"/> | ||
<corners android:radius="8dp"/> | ||
<stroke android:width="1dp" android:color="#1A000000" /> | ||
</shape> |
9 changes: 9 additions & 0 deletions
9
firebase-appdistribution/src/main/res/drawable/btn_stroked_background.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<!-- Drawable state list for background of basic button --> | ||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<!-- disabled button background --> | ||
<item android:state_enabled="false" android:drawable="@drawable/btn_disabled_stroked" /> | ||
<!-- default button background --> | ||
<item android:drawable="@drawable/btn_stroked" /> | ||
</selector> |
2 changes: 1 addition & 1 deletion
2
firebase-appdistribution/src/main/res/drawable/card_background.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,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> | ||
<corners android:radius="20dp"/> | ||
<corners android:radius="8dp"/> | ||
<padding android:left="10dp" android:right="10dp" android:top="10dp" android:bottom="10dp"/> | ||
<stroke android:width="1dp" android:color="#CCCCCC"/> | ||
</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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there are only two child elements and their relative positioning is pretty straightforward, wouldn't it make sense to use a simpler option for this container, e.g.
LinearLayout
(horizontal)?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually tried a
LinearLayout
before, but it wasn't clear to me how I could get the checkbox to align to the left and the button to align to the right. WithRelativeLayout
you get the niceandroid:layout_*
attributes which makes it easier.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RelativeLayout
looks good to me. Alternatively if you wanted to make it work withLinearLayout
you might be able to add an emptyView
with a weight of 1 in between the two, as a spacer: https://developer.android.com/develop/ui/views/layout/linear#WeightThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LinearLayout
with a spacer seems jankier, so I'd lean towards keeping it as aRelativeLayout
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe you can use
gravity
instead of an emptyView
:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried this, and it wasn't working. I'm probably not using

gravity
correctly here, but regardless I think theRelativeLayout
is sufficient here and I like the explicitness of theandroid:layout_*
attributes.