Last active
August 8, 2018 12:02
Revisions
-
Cheng Han revised this gist
Nov 18, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -75,7 +75,7 @@ ~~~~~~~~~~~~~~~~ public void setLetterSpacing(float mLetterSpacing) { ~~~~~~~~~~~~~~~~ These two methods are added in API 21, it might override after the target API is 21, so we can add @SuppressLint("Override")for now and if we change the target API in the future we can rename these method
-
Cheng Han revised this gist
Nov 18, 2014 . 1 changed file with 16 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -63,4 +63,19 @@ in drawable-xxhdpi: ab_stacked_solid_flightstheme.9.png, cab_background_bottom_flightstheme.9.png, cab_background_top_flightstheme.9.png [IconDensities] these *.9.png files are missing in the drawable-xxhdpi, http://stackoverflow.com/questions/17364394/android-graphics-for-xxhdpi so if we want do this, we can add these files into drawable-xxhdpi, otherwise just add the suppressLint("IconDensities") ============================ 7. ta-flights-android/TAFlights/src/main/java/com/tripadvisor/android/taflights/views/LetterSpacingTextView.java:35: Error: This method is not overriding anything with the current build target, but will in API level 21 (current target is 19): com.tripadvisor.android.taflights.views.LetterSpacingTextView#getLetterSpacing [Override] public float getLetterSpacing() { ~~~~~~~~~~~~~~~~ public void setLetterSpacing(float mLetterSpacing) { ~~~~~~~~~~~~~~~~ These two methods are added in API 21, so we can add @SuppressLint("Override") and if we change the target API in the future we can rename these method
-
Cheng Han revised this gist
Nov 18, 2014 . 1 changed file with 10 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,8 +9,16 @@ 2. the warnings in build.gradle showing that some of the tools are using the old version, do i need change these to newest, or just suppress lint to ignore NewerVersionAvailable. 3. for negative margin wawrnings in the code, /ta-flights-android/TAFlights/src/main/java/com/tripadvisor/android/taflights/views/FlightSearchItemView.java:154: Error: Call requires API level 21 (current min is 14): android.widget.TextView#setLetterSpacing [NewApi] i just use @SuppressLint("NewApi"), the error shows negative margin is avaiable in api 21, but i think it is not the reason; For negative margin in the xml, ta-flights-android/TAFlights/src/main/res/layout/fragment_airport_list.xml:14: Warning: Margin values should not be negative [NegativeMargin] i use tools:ignore="NegativeMargin". 4. About RelativeOverlap warnings: /ta-flights-android/TAFlights/src/main/res/layout/flight_search_result_item_row.xml:26: Warning: @id/marketing_airline_name can overlap @id/price if @id/price, @id/marketing_airline_name grow due to localized text expansion [RelativeOverlap] -
Cheng Han revised this gist
Nov 18, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,8 @@ will show error about paddingStart, and we do not currently support RTL, and paddingStart work the same way as paddingLeft, so i think it really about the NewApi. Because the lint tool just check whether paddingStart is compatible with api < 17, and I check that when api == 16, it works fine and does not crash. I have checked all the lint error list, i do not find other lint checks might solve this. So I think just add tools:ignore="NewApi" will be fine. 2. the warnings in build.gradle showing that some of the tools are using the old version, do i need change these to newest, or just suppress lint to ignore NewerVersionAvailable. -
Cheng Han revised this gist
Nov 18, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ 1. For paddingStart, Severity: Errors. because we also have paddingLeft, so for old platform, the paddingStart is ignored; so api < 17, the lint tool will show error about paddingStart, and we do not currently support RTL, and paddingStart work the same way as paddingLeft, so i think it really about the NewApi. Because the lint tool just check whether paddingStart is compatible with api < 17, and I check that when api == 16, it works fine and does not crash. I have checked all the lint error list, i do not find other lint checks might solve this. So I think just add tools:ignore="NewApi" will be fine. 2. the warnings in build.gradle showing that some of the tools are using the old version, do i need change these to newest, or just suppress lint to ignore NewerVersionAvailable. -
Cheng Han revised this gist
Nov 18, 2014 . No changes.There are no files selected for viewing
-
Cheng Han revised this gist
Nov 18, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -45,13 +45,13 @@ For leg_details_layout.xml, add tools:ignore="RelativeOverlap" For flight_search_result_item_row.xml, add tools:ignore="RelativeOverlap" 5. For overdraw warnings, i think add the suppressLint("Overdraw") will be fine; Or improving the performance by: http://stackoverflow.com/questions/11994454/possible-overdraw-root-element-paints-background http://stackoverflow.com/questions/9195762/possible-overdraw-root-element-paints-background second solution might need to change the source code. 6. Warnings /ta-flights-android/TAFlights/src/main/res/drawable-xxhdpi: Warning: Missing the following drawables in drawable-xxhdpi: ab_stacked_solid_flightstheme.9.png, cab_background_bottom_flightstheme.9.png, cab_background_top_flightstheme.9.png [IconDensities] these *.9.png files are missing in the drawable-xxhdpi, http://stackoverflow.com/questions/17364394/android-graphics-for-xxhdpi so if we want do this, we can add these files into drawable-xxhdpi, otherwise just add the suppressLint("IconDensities") -
Cheng Han revised this gist
Nov 18, 2014 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -45,7 +45,10 @@ For leg_details_layout.xml, add tools:ignore="RelativeOverlap" For flight_search_result_item_row.xml, add tools:ignore="RelativeOverlap" 5. For overdraw warnings, i think add the suppressLint("Overdraw") will be fine; Or improving the performance: http://stackoverflow.com/questions/11994454/possible-overdraw-root-element-paints-background http://stackoverflow.com/questions/9195762/possible-overdraw-root-element-paints-background second solution might need to change the source code. 6. Warnings /ta-flights-android/TAFlights/src/main/res/drawable-xxhdpi: Warning: Missing the following drawables in drawable-xxhdpi: ab_stacked_solid_flightstheme.9.png, cab_background_bottom_flightstheme.9.png, -
Cheng Han revised this gist
Nov 18, 2014 . 1 changed file with 9 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,8 +2,8 @@ because we also have paddingLeft, so for old platform, the paddingStart is ignored; so api < 17, the lint tool will show error about paddingStart, and we do not currently support RTL, and paddingStart work the same way as paddingLeft, so i think it really about the NewApi. Because the lint tool just check whether paddingStart is compatible with api < 17, and I check that when api == 16, it works fine and does not crash. I have checked all the lint error list, i just found the NewApi is good for this. So I think just add tools:ignore="NewApi" will be fine. 2. the warnings in build.gradle showing that some of the tools are using the old version, do i need change these to newest, or just suppress lint to ignore NewerVersionAvailable. @@ -45,4 +45,10 @@ For leg_details_layout.xml, add tools:ignore="RelativeOverlap" For flight_search_result_item_row.xml, add tools:ignore="RelativeOverlap" 5. For overdraw warnings, i think add the suppressLint("Overdraw") will be fine. 6. Warnings /ta-flights-android/TAFlights/src/main/res/drawable-xxhdpi: Warning: Missing the following drawables in drawable-xxhdpi: ab_stacked_solid_flightstheme.9.png, cab_background_bottom_flightstheme.9.png, cab_background_top_flightstheme.9.png [IconDensities] add the suppressLint("IconDensities") -
Cheng Han revised this gist
Nov 17, 2014 . 1 changed file with 24 additions and 11 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,29 +1,42 @@ 1. For paddingStart Errors, because we also have paddingLeft, so for old platform, the paddingStart is ignored; so api < 17, the lint tool will show error about paddingStart, and we do not currently support RTL, and paddingStart work the same way as paddingLeft, so i think it really about the NewApi. Because the lint tool just check whether paddingStart is compatible with api < 17, and I check that when api == 16, it works fine do not crash. So I think just add tools:ignore="NewApi" 2. the warnings in build.gradle showing that some of the tools are using the old version, do i need change these to newest, or just suppress lint to ignore NewerVersionAvailable. 3. for negative margin in the code, i just use @SuppressLint("NewApi"), the error shows negative margin is avaiable in api 21, but i think it is not the reason; For negative margin in the xml, i use tools:ignore="NegativeMargin". 4. About RelativeOverlap warnings: /ta-flights-android/TAFlights/src/main/res/layout/flight_search_result_item_row.xml:26: Warning: @id/marketing_airline_name can overlap @id/price if @id/price, @id/marketing_airline_name grow due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /ta-flights-android/TAFlights/src/main/res/layout/leg_details_layout.xml:58: Warning: @id/airline_name_text can overlap @id/amenities_view if @id/airline_name_text grows due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /ta-flights-android/TAFlights/src/main/res/layout/leg_details_layout.xml:197: Warning: ImageView-5 can overlap @id/warning_icon if @id/leg_warning_text grows due to localized text expansion [RelativeOverlap] <ImageView ^ /ta-flights-android/TAFlights/src/main/res/layout/outbound_summary_row.xml:35: Warning: @id/marketing_airline_name can overlap @id/outbound_date if @id/outbound_date, @id/marketing_airline_name grow due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /ta-flights-android/TAFlights/src/main/res/layout/search_result_header.xml:94: Warning: @id/travel_date_text_view can overlap @id/travel_place_text_view if @id/travel_place_text_view, @id/travel_date_text_view grow due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /ta-flights-android/TAFlights/src/main/res/layout/search_result_header.xml:126: Warning: @id/baggage_disclaimer_text_view can overlap @id/itinerary_summary if @id/itinerary_summary, @string/flights_app_baggage_fees_cbd grow due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /ta-flights-android/TAFlights/src/main/res/layout/simple_list_item_checkbox_2.xml:22: Warning: @id/text1 can overlap @id/check_box if @id/text1 grows due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ For click_to_call_banner_row.xml, change RelativeLayout to Linearlayout -
Cheng Han revised this gist
Nov 17, 2014 . 1 changed file with 13 additions and 8 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,26 +5,31 @@ 2. the warnings in build.gradle showing that some of the tools are using the old version, do i need change these to newest, or just suppress lint to ignore NewerVersionAvailable. 3. for negative margin in the code, i just use @SuppressLint("NewApi"), the error shows negative margin is avaiable in api 21, but i think it is not the reason; For negative margin in the xml, i use tools:ignore="NegativeMargin". 4. About RelativeOverlap warnings: /ta-flights-android/TAFlights/src/main/res/layout/flight_search_result_item_row.xml:26: Warning: @id/marketing_airline_name can overlap @id/price if @id/price, @id/marketing_airline_name grow due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /ta-flights-android/TAFlights/src/main/res/layout/leg_details_layout.xml:58: Warning: @id/airline_name_text can overlap @id/amenities_view if @id/airline_name_text grows due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /ta-flights-android/TAFlights/src/main/res/layout/leg_details_layout.xml:197: Warning: ImageView-5 can overlap @id/warning_icon if @id/leg_warning_text grows due to localized text expansion [RelativeOverlap] <ImageView ^ /ta-flights-android/TAFlights/src/main/res/layout/outbound_summary_row.xml:35: Warning: @id/marketing_airline_name can overlap @id/outbound_date if @id/outbound_date, @id/marketing_airline_name grow due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /ta-flights-android/TAFlights/src/main/res/layout/search_result_header.xml:94: Warning: @id/travel_date_text_view can overlap @id/travel_place_text_view if @id/travel_place_text_view, @id/travel_date_text_view grow due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /ta-flights-android/TAFlights/src/main/res/layout/search_result_header.xml:126: Warning: @id/baggage_disclaimer_text_view can overlap @id/itinerary_summary if @id/itinerary_summary, @string/flights_app_baggage_fees_cbd grow due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /ta-flights-android/TAFlights/src/main/res/layout/simple_list_item_checkbox_2.xml:22: Warning: @id/text1 can overlap @id/check_box if @id/text1 grows due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ For click_to_call_banner_row.xml, change RelativeLayout to Linearlayout For search_result_header.xml, add tools:ignore="RelativeOverlap" For outbound_summary_row.xml, add tools:ignore="RelativeOverlap" For leg_details_layout.xml, add tools:ignore="RelativeOverlap" For flight_search_result_item_row.xml, add tools:ignore="RelativeOverlap" 5. -
Cheng Han revised this gist
Nov 17, 2014 . 1 changed file with 26 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,30 @@ 1. For paddingStart Errors, because we also have paddingLeft, so for old platform, the paddingStart is ignored; so api < 17, the lint tool will show error about paddingStart, and we do not currently support RTL, and paddingStart work the same way as paddingLeft, so i think it really about the NewApi. Because the lint tool just check whether paddingStart is compatible with api < 17, and I check that when api == 16, it works fine do not crash. So I think just add tools:ignore="NewApi" 2. the warnings in build.gradle showing that some of the tools are using the old version, do i need change these to newest, or just suppress lint to ignore NewerVersionAvailable. 3. for negative margin in the code, i just use @SuppressLint("NewApi"), the error shows negative margin is avaiable in api 21, but i think it is not the reason; For negative margin in the xml, i use tools:ignore="NegativeMargin". 4. About RelativeOverlap warnings: /Users/chan/Documents/tripadvisor/ta-flights-android/TAFlights/src/main/res/layout/flight_search_result_item_row.xml:26: Warning: @id/marketing_airline_name can overlap @id/price if @id/price, @id/marketing_airline_name grow due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /Users/chan/Documents/tripadvisor/ta-flights-android/TAFlights/src/main/res/layout/leg_details_layout.xml:58: Warning: @id/airline_name_text can overlap @id/amenities_view if @id/airline_name_text grows due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /Users/chan/Documents/tripadvisor/ta-flights-android/TAFlights/src/main/res/layout/leg_details_layout.xml:197: Warning: ImageView-5 can overlap @id/warning_icon if @id/leg_warning_text grows due to localized text expansion [RelativeOverlap] <ImageView ^ /Users/chan/Documents/tripadvisor/ta-flights-android/TAFlights/src/main/res/layout/outbound_summary_row.xml:35: Warning: @id/marketing_airline_name can overlap @id/outbound_date if @id/outbound_date, @id/marketing_airline_name grow due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /Users/chan/Documents/tripadvisor/ta-flights-android/TAFlights/src/main/res/layout/search_result_header.xml:94: Warning: @id/travel_date_text_view can overlap @id/travel_place_text_view if @id/travel_place_text_view, @id/travel_date_text_view grow due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /Users/chan/Documents/tripadvisor/ta-flights-android/TAFlights/src/main/res/layout/search_result_header.xml:126: Warning: @id/baggage_disclaimer_text_view can overlap @id/itinerary_summary if @id/itinerary_summary, @string/flights_app_baggage_fees_cbd grow due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ /Users/chan/Documents/tripadvisor/ta-flights-android/TAFlights/src/main/res/layout/simple_list_item_checkbox_2.xml:22: Warning: @id/text1 can overlap @id/check_box if @id/text1 grows due to localized text expansion [RelativeOverlap] <com.tripadvisor.android.taflights.views.RobotoTextView ^ For click_to_call_banner_row.xml, change RelativeLayout to Linearlayout For search_result_header.xml, add -
Cheng Han revised this gist
Nov 17, 2014 . 1 changed file with 7 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,8 @@ 1. For paddingStart Errors, because we also have paddingLeft, so for old platform, the paddingStart is ignored; so api < 17, the lint tool will show error about paddingStart, and we do not currently support RTL, and paddingStart work the same way as paddingLeft, so i think it really about the NewApi. Because the lint tool just check whether paddingStart is compatible with api < 17, and I check that when api == 16, it works fine do not crash. So I think just add tools:ignore="NewApi" 2. the warnings in build.gradle showing that some of the tools are using the old version, do i need change these to newest, or just suppress lint to ignore NewerVersionAvailable. 3. for negative margin in the code, i just use @SuppressLint("NewApi"), the error shows negative margin is avaiable in api 21, but i think it is not the reason; For negative margin in the xml, i use tools:ignore="NegativeMargin". 4. -
Cheng Han created this gist
Nov 17, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ 1. For paddingStart errors, because we also have paddingLeft, so for old platform, the paddingStart is ignored; so api < 17, the lint tool will show error about paddingStart, so i think it really about the NewApi, rather than RTL