-
Notifications
You must be signed in to change notification settings - Fork 965
Rewards tipping tablet UI #20223
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
Rewards tipping tablet UI #20223
Conversation
30c3281
to
7b02948
Compare
7b02948
to
435978c
Compare
36ad97f
to
656f0a1
Compare
cc : @Miyayes |
656f0a1
to
c629f63
Compare
@Override | ||
public void onResume() { | ||
super.onResume(); | ||
|
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.
nit : we can remove the new line here.
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.
updated
|
||
WindowManager.LayoutParams params = window.getAttributes(); | ||
boolean isLandscape = ConfigurationUtils.isLandscape(getActivity()); | ||
if (isLandscape) { |
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.
we can similar to below,
float widthRatio = isLandscape ? 0.8 : 0.96;
params.width = (int) (widthRatio*mDeviceWidth);
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.
updated
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.fragment.app.Fragment; | ||
|
||
import com.bumptech.glide.Glide; |
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.
Can we remove glide usage here ? we need to move away from glide at some point so it's better to remove any usage we have.
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.
This code is old, just moved from activity to fragment.
Do you want to use ImageLoader here?
Last time I tested same thing Image Loader is very slow and caching is not working.
Filed issue : brave/brave-browser#30136
Please let me know if anything update happened in ImageLoader recently.
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 update it with ImageLoader and add details to the issue if we have any performance issues. so we can look into it separately.
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.
Sure, I will implement ImageLoader, even it's slow and caching is not working.
I will update details in the issue..
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.
@deeppandya
Now it's Updated with ImageLoader
https://github.com/brave/brave-core/assets/32419898/76905bc4-404e-4445-bf15-b06824fcbc3e
} | ||
} | ||
|
||
private String getProvider(String provider) { |
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.
we can use android:inputType="textCapWords"
for Textview instead of changing the text here.
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.
This same logic is used in desktop side
PCDN data will contain normal word and need to map proper format like
youtube -> YouTube
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.
in that case, is it possible to use the same function as desktop through mojom ?
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.
It's not exposed , code is here
https://github.com/brave/brave-core/blob/master/components/brave_rewards/resources/shared/lib/publisher_platform.ts#L13
c629f63
to
9ddecfa
Compare
c8d5b1d
to
c743c3a
Compare
<shape> | ||
<corners android:radius="28dp" /> | ||
<solid android:color="@color/rewards_background_gradient_end_color"/> | ||
|
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.
nit : remove extra new line
android:startX="90" | ||
android:startY="254" | ||
android:type="linear" />> | ||
|
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.
nit : remove extra new line
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal"> | ||
|
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.
nit : remove extra new line
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.
LGTM
c743c3a
to
0df6ff4
Compare
</shape> | ||
</item> | ||
</layer-list> | ||
|
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.
nit : remove extra new line
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.
LGTM
0df6ff4
to
8f40543
Compare
Resolves brave/brave-browser#30371
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: