-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Make the descriptions on the intro pages scrollable #964
Conversation
I met this mistake again. Great! I agree with your fix 👍 @yuhuitech |
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.
Thanks for your PR 🙏
The layout-land
file should also be adapted.
<TextView | ||
android:id="@+id/description" | ||
style="@style/AppIntroDefaultText" | ||
<ScrollView |
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.
The scrollview is not needed. It should be enought with:
android:scrollbars = "vertical"
Plus
textView.setMovementMethod(new ScrollingMovementMethod());
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.
OK, I will work on this right now. :)
Thank you so much!
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.
Hi! Those two methods seem to have the same effect as far as I am concerned. And I also guess it would be easier to maintain the project if we let the XML do all the rendering work. Editing Java files would also work, but maybe it is harder for other developers to associate it with the XML file. This is my opinion. I would appreciate it if you could give me some advice on this. Thank you so much! :)
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.
If it is OK with you I would like to do the adaptation work of the landscape mode. :)
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.
Let's go with the XML only approach 👍
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.
Please note this:
The scrollview is not needed.
You can remove the ScrollView entirely 👍
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.
Hi! Sorry for the wait. I guess I have solved the problem when the landscape mode is used. Here are some screenshots after modifications when using the largest display size:
and the smallest display size:
I am looking forward to your review. Thanks again for your kindness and your precious time!! :)
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.
You can remove the ScrollView entirely
If I remove the ScrollView, should I use the java code you recommended earlier?
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.
Please do your own researches/trial and let me know what's the outcome.
The solution with the least amount of changes is generally preferred.
Like if we can solve it by just adding an XML attribute, that would be the preferred approach.
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.
OK, I could comprehend the meaning you are trying to deliver to me now. Therefore I would like to make a comparison of those two methods and I would like to inform you of this once it is ready. And I will also minimize the changes I could apply to those files. :)
Thanks again!
Hello! Sorry for the wait. After my research on this project and this problem, I would like to recommend you modify XML files only. Here is the reason. I did some investigations on this project and I found that maybe it is the "AppIntroBaseFragment.kt" file that controls the creation of the views on the Intro pages, which is this function
In the meantime, I also revoked all the changes I applied to those two XML files. Then I started my test. Here are some normal screenshots after my test, and in such circumstances, those text views could be seen fully: And it also could handle the situation where an extremly longer sentence is in the text view. However, this screenshot is not that charming when it comes to the land mode, mainly for the title. As you could see, a part of the title is blocked by its border. But the description is scrollable. According to my comparison, I found some layout issues in the land mode, which are caused by the XML file. So I guess the land mode XML file needs a repair. From the screenshots I have shown you before, I reckon that I have tackled this problem without changing any kt or java code, just some modifications on the XML files. That is, after my modifications, the long title on the land mode is not blocked. So my final conclusion is that perhaps we don't need to change any kt or java files but only XML files to reach this goal. That is my opinion. I am very humble and sincere so I would be so glad if you could leave me some advice on this. And I would like to make contributions to this project with all of my best efforts. :) Thanks again! |
Thanks for your clarification and for taking the time to look into this,
Are you suggesting we go with the |
Yes, we should go with the |
I would like to take a view at my implementation here: 91909ec It doesn't use the |
Yes, I also believe tuning is necessary and I would like to try your code. And I also would like to add that since those introduction pages are static and they don't need changes during running time, I believe it would be better to declare UI layouts in XML files considering performance, speed as such. |
What's the status of this PR? |
Hello! I am quite busy recently, and I have tested your code already, and I think they are good to go. Making those text scrollable is a wonderful choice. |
Thanks for the feedback. I believe we might want to include this change into #978 |
Dear developer:
Hello! I am the creator of issue #963, and I have fixed the blocked descriptions to make it more responsive. I would appreciate it if you could kindly revise my code and leave me some advice. Thank you so much for your precious time!
Here are the screenshots after my changes:
Thanks again! Blessings on your day! :)