Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(747)

Issue 1603383003: color, package and action bar configuration. (Closed)

Created:
4 years, 11 months ago by BigBossZhiling
Modified:
4 years, 3 months ago
Reviewers:
Ian Wen
Base URL:
https://github.com/GoogleChrome/custom-tabs-client.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

color, package and action bar configuration. BUG=

Patch Set 1 #

Patch Set 2 : Moved everything to demos. #

Patch Set 3 : small fixes #

Patch Set 4 : Included the spinner row xml file into the commit. #

Patch Set 5 : Added package configuration and created a new advanced ui setting activity. #

Patch Set 6 : Added action bar configuration item. #

Total comments: 52

Patch Set 7 : Address issues. #

Patch Set 8 : fixes #

Total comments: 39

Patch Set 9 : address issues #

Total comments: 2

Patch Set 10 : fixes #

Total comments: 45

Patch Set 11 : fixes #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+682 lines, -69 lines) Patch
M demos/build.gradle View 1 2 3 4 5 6 1 chunk +1 line, -1 line 2 comments Download
M demos/src/main/AndroidManifest.xml View 1 2 3 4 5 6 7 8 9 10 3 chunks +18 lines, -0 lines 1 comment Download
A demos/src/main/java/org/chromium/customtabsdemos/AdvancedUISettingActivity.java View 1 2 3 4 5 6 7 8 9 10 1 chunk +307 lines, -0 lines 7 comments Download
M demos/src/main/java/org/chromium/customtabsdemos/CustomTabActivityHelper.java View 1 2 3 4 5 6 7 8 9 10 1 chunk +18 lines, -5 lines 0 comments Download
M demos/src/main/java/org/chromium/customtabsdemos/CustomUIActivity.java View 1 2 3 4 5 6 7 8 9 10 4 chunks +93 lines, -19 lines 1 comment Download
A demos/src/main/res/drawable-hdpi/ic_action_name.png View 1 2 3 4 5 Binary file 0 comments Download
A demos/src/main/res/drawable-mdpi/ic_action_name.png View 1 2 3 4 5 Binary file 0 comments Download
A demos/src/main/res/drawable-xhdpi/ic_action_name.png View 1 2 3 4 5 Binary file 0 comments Download
A demos/src/main/res/drawable-xxhdpi/ic_action_name.png View 1 2 3 4 5 Binary file 0 comments Download
M demos/src/main/res/layout/activity_custom_ui.xml View 1 2 3 4 5 6 7 8 9 10 6 chunks +18 lines, -24 lines 0 comments Download
A demos/src/main/res/layout/advanced_ui_setting.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +96 lines, -0 lines 0 comments Download
A demos/src/main/res/layout/display_action_bar_item_setting.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +80 lines, -0 lines 1 comment Download
M demos/src/main/res/values/dimens.xml View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -1 line 1 comment Download
M demos/src/main/res/values/strings.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -1 line 0 comments Download
M demos/src/main/res/values/styles.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -2 lines 1 comment Download
M shared/src/main/java/org/chromium/customtabsclient/shared/CustomTabsHelper.java View 1 2 3 4 5 6 7 8 9 10 4 chunks +37 lines, -16 lines 0 comments Download

Messages

Total messages: 23 (7 generated)
BigBossZhiling
4 years, 11 months ago (2016-01-20 21:36:01 UTC) #4
BigBossZhiling
Deleted the changes in application and added color configuration for tool bar in demos.
4 years, 11 months ago (2016-01-22 23:30:18 UTC) #6
BigBossZhiling
Deleted the changes in application and added color configuration for tool bar in demos.
4 years, 11 months ago (2016-01-22 23:30:19 UTC) #7
BigBossZhiling
Deleted the changes in application and added color configuration for tool bar in demos.
4 years, 11 months ago (2016-01-22 23:30:19 UTC) #8
BigBossZhiling
4 years, 10 months ago (2016-01-27 23:06:53 UTC) #10
BigBossZhiling
https://codereview.chromium.org/1603383003/diff/100001/customtabs/src/android/support/customtabs/CustomTabsIntent.java File customtabs/src/android/support/customtabs/CustomTabsIntent.java (right): https://codereview.chromium.org/1603383003/diff/100001/customtabs/src/android/support/customtabs/CustomTabsIntent.java#newcode273 customtabs/src/android/support/customtabs/CustomTabsIntent.java:273: * Probably I should take this away.
4 years, 10 months ago (2016-02-08 22:57:32 UTC) #11
Ian Wen
Lot's of comments, most of which you can check the code style guide here. https://source.android.com/source/code-style.html ...
4 years, 10 months ago (2016-02-09 00:14:16 UTC) #14
BigBossZhiling
https://codereview.chromium.org/1603383003/diff/100001/demos/build.gradle File demos/build.gradle (right): https://codereview.chromium.org/1603383003/diff/100001/demos/build.gradle#newcode27 demos/build.gradle:27: //compile 'com.android.support:customtabs:23.1.1' On 2016/02/09 00:14:15, Ian Wen wrote: > ...
4 years, 10 months ago (2016-02-09 01:03:12 UTC) #15
BigBossZhiling
4 years, 10 months ago (2016-02-09 20:14:52 UTC) #16
Ian Wen
Looks better. Still some issues. :) 1. Empty @return or @params in javadoc is not ...
4 years, 10 months ago (2016-02-10 02:36:07 UTC) #17
BigBossZhiling
https://codereview.chromium.org/1603383003/diff/140001/demos/src/main/AndroidManifest.xml File demos/src/main/AndroidManifest.xml (right): https://codereview.chromium.org/1603383003/diff/140001/demos/src/main/AndroidManifest.xml#newcode87 demos/src/main/AndroidManifest.xml:87: android:name=".Camera" On 2016/02/10 02:36:06, Ian Wen wrote: > s/Camera/CameraActivity. ...
4 years, 10 months ago (2016-02-17 05:18:10 UTC) #18
BigBossZhiling
4 years, 10 months ago (2016-02-19 18:04:47 UTC) #19
BigBossZhiling
4 years, 9 months ago (2016-03-08 18:49:14 UTC) #20
Ian Wen
Simpler than previous patch, which is good. https://chromiumcodereview.appspot.com/1603383003/diff/140001/demos/src/main/AndroidManifest.xml File demos/src/main/AndroidManifest.xml (right): https://chromiumcodereview.appspot.com/1603383003/diff/140001/demos/src/main/AndroidManifest.xml#newcode87 demos/src/main/AndroidManifest.xml:87: android:name=".Camera" On ...
4 years, 9 months ago (2016-03-16 01:35:31 UTC) #21
BigBossZhiling
https://codereview.chromium.org/1603383003/diff/180001/demos/src/main/java/org/chromium/customtabsdemos/AdvancedUISettingActivity.java File demos/src/main/java/org/chromium/customtabsdemos/AdvancedUISettingActivity.java (right): https://codereview.chromium.org/1603383003/diff/180001/demos/src/main/java/org/chromium/customtabsdemos/AdvancedUISettingActivity.java#newcode68 demos/src/main/java/org/chromium/customtabsdemos/AdvancedUISettingActivity.java:68: static String[] getColors() { On 2016/03/16 01:35:30, Ian Wen ...
4 years, 9 months ago (2016-03-18 00:59:08 UTC) #22
Ian Wen
4 years, 9 months ago (2016-03-21 18:46:29 UTC) #23
I see some improvements.

1. Please update your CL description.
2. Please rebase.
3. Please be sure to read through our java code style guideline carefully.
4. Please apply my comments to all pieces of code so that we don't repeat
ourselves.

https://codereview.chromium.org/1603383003/diff/180001/shared/src/main/java/o...
File
shared/src/main/java/org/chromium/customtabsclient/shared/CustomTabsHelper.java
(right):

https://codereview.chromium.org/1603383003/diff/180001/shared/src/main/java/o...
shared/src/main/java/org/chromium/customtabsclient/shared/CustomTabsHelper.java:149:
public static ArrayList<String> getAllPackagesSupportingCustomTabs(Context
context) {
On 2016/03/18 00:59:08, BigBossZhiling wrote:
> On 2016/03/16 01:35:31, Ian Wen wrote:
> > 1. I would make it a private method.
> > 2. I would rename it to getAppsSupportingCustomTabs.
> 
> I think probably it can't be a private method because in the package spinner
of
> the setting page, we need to getAllPackagesSupportingCustomTabs and show it to
> the user and let the user pick the one he wants.

Why not use the function in #140?

I would put the code in this function back to #80, and let AdvancedUIActivity
use getPackages().

https://codereview.chromium.org/1603383003/diff/200001/demos/build.gradle
File demos/build.gradle (right):

https://codereview.chromium.org/1603383003/diff/200001/demos/build.gradle#new...
demos/build.gradle:17: proguardFiles
getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
Also please rebase your patch. There were several conflicts when I tried to
apply.

https://codereview.chromium.org/1603383003/diff/200001/demos/build.gradle#new...
demos/build.gradle:26: compile project(':customtabs')
I think this change is no longer needed. 23.2.1 is already released. What we
should do is to change #24 to 23.2.1, and reference customtabs:23.2.1 in #26.

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/Android...
File demos/src/main/AndroidManifest.xml (right):

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/Android...
demos/src/main/AndroidManifest.xml:88: <meta-data
Q: what does meta-data do?

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/java/or...
File
demos/src/main/java/org/chromium/customtabsdemos/AdvancedUISettingActivity.java
(right):

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/java/or...
demos/src/main/java/org/chromium/customtabsdemos/AdvancedUISettingActivity.java:66:
static Bitmap uriToBitmap(Context context, Uri uri) {
1. Why is it a package method? If this method is only used in another activity,
put it there instead.
2. Rename to getBitmapFromUri()

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/java/or...
demos/src/main/java/org/chromium/customtabsdemos/AdvancedUISettingActivity.java:83:
mPackageName = (String) getIntent().getSerializableExtra(KEY_PACKAGE);
Again, like what I said in the previous patch, use Intent#getStringExtra()
instead.

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/java/or...
demos/src/main/java/org/chromium/customtabsdemos/AdvancedUISettingActivity.java:152:
fieldList.add(i, colorName.charAt(0) + colorName.substring(1).toLowerCase());
I would remove #151 and #152. Let's focus on more practical issues...

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/java/or...
demos/src/main/java/org/chromium/customtabsdemos/AdvancedUISettingActivity.java:178:
{
Code format incorrect! :( Please push #178 to #177.

Again, please read through the guideline carefully
https://source.android.com/source/code-style.html

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/java/or...
demos/src/main/java/org/chromium/customtabsdemos/AdvancedUISettingActivity.java:185:
Uri.parse(image));
Push #185 to #184

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/java/or...
demos/src/main/java/org/chromium/customtabsdemos/AdvancedUISettingActivity.java:265:
* Select UI setting previously set by the user.
s/Select/Selects

Same for all javadocs you write. Javadoc for a function is used to "describe"
the behavior of the function, not to "command" the function to do something.

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/java/or...
demos/src/main/java/org/chromium/customtabsdemos/AdvancedUISettingActivity.java:294:
this.image = image;
Remove "this." Same for all other places.

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/java/or...
File demos/src/main/java/org/chromium/customtabsdemos/CustomUIActivity.java
(right):

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/java/or...
demos/src/main/java/org/chromium/customtabsdemos/CustomUIActivity.java:50:
private int ADVANCED_SETTING_REQUEST_CODE;
Constants should be static final, and should be put on the very top of the file.

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/res/lay...
File demos/src/main/res/layout/display_action_bar_item_setting.xml (right):

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/res/lay...
demos/src/main/res/layout/display_action_bar_item_setting.xml:18:
android:layout_width="match_parent"
A general guideline for all of the xml layout files:
1. android:id should be the first element.
2. android:layout_* should be the second element and they should group together.
3. tools:* and other namespaces should be placed below android namespace.

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/res/val...
File demos/src/main/res/values/dimens.xml (right):

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/res/val...
demos/src/main/res/values/dimens.xml:23: <dimen
name="button_padding_top">10dp</dimen>
Please make sure all of the listed dimensions are used at lease once.

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/res/val...
File demos/src/main/res/values/styles.xml (left):

https://codereview.chromium.org/1603383003/diff/200001/demos/src/main/res/val...
demos/src/main/res/values/styles.xml:17: 
Revert the changes to this file?

Powered by Google App Engine
This is Rietveld 408576698