Skip to content
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

Fix the blocked camera icon on the main page #741

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

EasyVector
Copy link

Dear developer:

Hello! I am the creator of issue #740, and I have fixed the blocked camera icon on the main page. I would genuinely appreciate it if you could kindly revise my code and leave me some advice. Thank you so much for your precious time!

Here is the screenshot after my changes. As you can see this navigation bar is scrollable now:

copy copy

Thanks again! Blessings on your day! :)

@Wahhe1
Copy link

Wahhe1 commented Sep 4, 2021

Camera issue is resolved

@schildbach
Copy link
Collaborator

Thanks for your suggested fix. I must admit I'm not happy with making the bottom action bar scrollable – it doesn't really fix the problem.

My suggestions for resolving this are one of:

  • Make the strings shorter, e.g. shorten "Request coins" to just "Request". However this would need to be done for all translations too.
  • Allow the strings to wrap (will look ugly).
  • On small screens, move the "Request coins" action into the overflow menu.
  • Super quick fix: Just make sure that if the bottom action bar clips, it clips on the left instead of on the right, because the scan button is more important.

@EasyVector
Copy link
Author

OK, please leave this to me. I would like to fix it in another way. :)

Thanks again!

@EasyVector
Copy link
Author

Hello! Sorry for the wait, and I guess I have fixed this display problem. And here are screenshots after my fix:

copy copy

I am not sure if it is right for you, and please let me know if you have any thoughts. Thank you so much! :)

@EasyVector
Copy link
Author

Hi! I just found out that the texts are wrapped so I would like to enhance the display effect with ConstraintLayout and AppCompatTextView. And the result turns out well!!

I did some tests on Pixel 2 with API 25 and 29, and Pixel 3 XL with API 29. Here are the screenshots after my fix:

Pixel 2 with API 25:
copy copy

Pixel 2 with API 29:
copy copy

Pixel 3 XL with API 29
copy copy

I am looking forward to your opinion. Thanks again! :)

@EasyVector
Copy link
Author

Hi! I just realized that the XML code would be much tidier if I keep using LinearLayout instead of ConstraintLayout. So I made some changes to this and the effects are still the same. :)

@bitcoin-wallet bitcoin-wallet deleted a comment from GHamidreza Sep 7, 2021
Copy link
Collaborator

@schildbach schildbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain you you're going to change the layout?

I can see from the screenshot there is now missing a bit of space at the top and bottom of the action bar.

@@ -25,6 +25,7 @@ dependencies {
implementation 'com.google.protobuf:protobuf-java:3.7.1'
implementation 'com.google.guava:guava:29.0-android'
implementation 'com.google.zxing:core:3.3.3'
implementation 'androidx.appcompat:appcompat:1.3.1'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The app deliberately isn't using AppCompat. I think you can archieve the same thing using the standard views.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I will try to. The missing space is easy to handle. But could you tell me the reason why you deliberately do not use AppCompat? Is it because of some latent compatibility issues? Thanks.

@schildbach
Copy link
Collaborator

I'm proposing this simple change to fix clipping the scan button: #742

It will clip the request button instead, but that one is much bigger.

@EasyVector
Copy link
Author

OK, how about this? I do not change the original layout and I manage to set some spaces above and below the scan icon. The texts inside those buttons are arranged in two lines now when the screen display size is the largest.

copy copy

@EasyVector EasyVector changed the title Fixed the blocked camera icon on the main page Fix the blocked camera icon on the main page Sep 7, 2021
@schildbach
Copy link
Collaborator

fyi: I merged #742, so the issue now looks like this (without the ability to scroll): https://user-images.githubusercontent.com/25502419/131453646-293c91bf-1aed-4c9b-85b0-b5b9c9c78dcf.png

@schildbach
Copy link
Collaborator

The two-line buttons seem fine, although like I said I think it looks a bit ugly. However I think all it needs is overriding the singleLine attribute on the Buttons themselves – no need for a separate style and I guess also no need for all the other changes.

In your previous solution you made use of the auto scaling of AppCompatTextView. This feature is available on the framework's TextView too, on Android 8+.

General note: We don't yet use the start/end positions yet. I would prefer to use left/right for now and migrate the entire app to bidi layout at a later date.

Copy link

@Naywin220 Naywin220 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Grek1313

This comment was marked as spam.

Copy link

@Grek1313 Grek1313 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0x09732C60Ba287Ac9226152ffe940c5E2Ca962EB8

Copy link

@Dorineb07 Dorineb07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve

@bitcoin-wallet bitcoin-wallet deleted a comment May 4, 2022
@@ -5,38 +5,37 @@
android:theme="@android:style/ThemeOverlay.Material.Dark.ActionBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/list_entry_padding_horizontal_cram"
android:paddingBottom="@dimen/list_entry_padding_horizontal_cram"
android:measureWithLargestChild="true"
android:orientation="horizontal">

<Button

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best deals coming

@Benson665
Copy link

Is quite fixed is more easier than before and more understanding to check in and out

@Whiskey992
Copy link

Whiskey992 commented Nov 8, 2022 via email

Vicen811226 referenced this pull request Dec 8, 2022
android:measureWithLargestChild="true"
android:orientation="horizontal">

<Button
android:id="@+id/wallet_actions_request"
style="@style/My.Widget.ActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

This comment was marked as spam.

@@ -5,38 +5,37 @@
android:theme="@android:style/ThemeOverlay.Material.Dark.ActionBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/list_entry_padding_horizontal_cram"
android:paddingBottom="@dimen/list_entry_padding_horizontal_cram"
android:measureWithLargestChild="true"
android:orientation="horizontal">

<Button
android:id="@+id/wallet_actions_request"

This comment was marked as spam.

This comment was marked as spam.

@bitcoin-wallet bitcoin-wallet deleted a comment from Bigjohn2396 Aug 8, 2023
@bitcoin-wallet bitcoin-wallet deleted a comment Aug 8, 2023
@bitcoin-wallet bitcoin-wallet deleted a comment from try2nks Aug 9, 2023
@JhoonPool

This comment was marked as spam.

@JhoonPool

This comment was marked as spam.

@JhoonPool

This comment was marked as spam.

@JhoonPool

This comment was marked as spam.

@JhoonPool

This comment was marked as spam.

@JhoonPool

This comment was marked as spam.

@JhoonPool

This comment was marked as spam.

@nElzky
Copy link

nElzky commented Nov 15, 2023

Dear developer:

Hello! I am the creator of issue #740, and I have fixed the blocked camera icon on the main page. I would genuinely appreciate it if you could kindly revise my code and leave me some advice. Thank you so much for your precious time!

Here is the screenshot after my changes. As you can see this navigation bar is scrollable now:

copy copy

Thanks again! Blessings on your day! :)

@bitcoin-wallet bitcoin-wallet deleted a comment from Devineonline99 Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet