Fix a lot of easy lint issues

Change-Id: I80b43dae137cbbb912ec0fcc4e401de16a9b44a1
This commit is contained in:
Michael Jurka 2012-02-23 18:25:43 -08:00
parent 7747119b40
commit 6cfafb96c3
20 changed files with 16 additions and 120 deletions

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:valueFrom="1.0"
android:valueTo="0.5"
android:valueType="floatType"
android:duration="100"
android:propertyName="alpha"
android:repeatCount="1"
android:repeatMode="reverse"/>

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@drawable/tab_unselected_focused_holo" />
<item android:state_pressed="true" android:drawable="@drawable/tab_unselected_focused_holo" />
<item android:drawable="@android:color/transparent" />
</selector>

View File

@ -16,7 +16,6 @@
<com.android.launcher2.FolderIcon
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"

View File

@ -15,7 +15,6 @@
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
style="@style/SearchDropTargetBar"
android:layout_width="@dimen/qsb_bar_height"
android:layout_height="match_parent">

View File

@ -16,7 +16,6 @@
<com.android.launcher2.FolderIcon
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"

View File

@ -15,8 +15,7 @@
-->
<com.android.launcher2.DragLayer
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
xmlns:android="http://schemas.android.com/apk/res/android" >
android:id="@+id/drag_layer"
android:layout_width="match_parent"

View File

@ -15,7 +15,6 @@
-->
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
style="@style/MarketButton"
android:onClick="onClickAppMarketButton"
android:gravity="center"

View File

@ -15,7 +15,6 @@
-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
style="@style/SearchDropTargetBar"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -63,7 +62,6 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/all_apps_divider"
android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
android:paddingRight="@dimen/toolbar_button_horizontal_padding"
android:paddingTop="@dimen/all_apps_button_vertical_padding"
@ -73,4 +71,4 @@
android:focusable="true"
android:clickable="true"
android:contentDescription="@string/accessibility_all_apps_button" />
</RelativeLayout>
</RelativeLayout>

View File

@ -15,7 +15,6 @@
-->
<ProgressBar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
style="?android:attr/progressBarStyleLarge"
android:id="@+id/apps_customize_progress_bar"
android:layout_width="wrap_content"

View File

@ -15,7 +15,6 @@
-->
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
style="@style/MarketButton"
android:onClick="onClickAppMarketButton"
android:gravity="center"

View File

@ -15,7 +15,6 @@
-->
<com.android.launcher2.SearchDropTargetBar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
style="@style/QSBBar"
android:focusable="false">

View File

@ -15,8 +15,7 @@
-->
<ImageView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:visibility="gone"
android:alpha="0"
android:scaleType="fitXY"
android:src="@drawable/hotseat_scrubber_holo" />
android:src="@drawable/hotseat_scrubber_holo" />

View File

@ -15,10 +15,9 @@
-->
<ImageView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:paddingLeft="@dimen/workspace_divider_padding_left"
android:paddingRight="@dimen/workspace_divider_padding_right"
android:paddingTop="@dimen/workspace_divider_padding_top"
android:paddingBottom="@dimen/workspace_divider_padding_bottom"
android:scaleType="fitXY"
android:src="@drawable/hotseat_track_holo" />
android:src="@drawable/hotseat_track_holo" />

View File

@ -69,10 +69,6 @@
<integer name="apps_customize_cling_focused_x">2</integer>
<integer name="apps_customize_cling_focused_y">1</integer>
<!-- Padding applied to AppWidgets -->
<dimen name="app_widget_padding_top">8dp</dimen>
<dimen name="app_widget_padding_bottom">8dp</dimen>
<!-- Folders -->
<!-- The size of the image which sits behind the preview of the folder contents -->
<dimen name="folder_preview_size">58dp</dimen>

View File

@ -30,10 +30,6 @@
<dimen name="hotseat_width_gap">0dp</dimen>
<dimen name="hotseat_height_gap">0dp</dimen>
<dimen name="hotseat_top_padding">-1dp</dimen>
<dimen name="hotseat_bottom_padding">-1dp</dimen>
<dimen name="hotseat_left_padding">-1dp</dimen>
<dimen name="hotseat_right_padding">-1dp</dimen>
<dimen name="qsb_bar_height">48dp</dimen>
<!-- height of the bottom row of controls -->

View File

@ -62,11 +62,6 @@
<!-- dimensions for the wallpaper picker wallpaper thumbnail width -->
<dimen name="wallpaper_chooser_grid_width">196dp</dimen>
<dimen name="wallpaper_chooser_grid_height">140dp</dimen>
<dimen name="live_wallpaper_grid_item_padding">8dip</dimen>
<!-- How much the content view of an alert dialog should be inset (currently used
for the WallpaperChooser in XLarge mode) -->
<dimen name="alert_dialog_content_inset">0dp</dimen>
<!-- When dragging items on the workspace, the number of dps by which the position of
the drag view should be offset from the position of the original view. -->

View File

@ -5,21 +5,9 @@
<!-- AllApps/Customize/AppsCustomize -->
<!-- The alpha of the AppsCustomize bg in spring loaded mode -->
<integer name="config_appsCustomizeSpringLoadedBgAlpha">45</integer>
<!-- Fade in/out duration of icons being dragged from the trays -->
<integer name="config_dragAppsCustomizeIconFadeInDuration">150</integer>
<integer name="config_dragAppsCustomizeIconFadeOutDuration">200</integer>
<integer name="config_dragAppsCustomizeIconFadeAlpha">100</integer>
<integer name="config_workspaceUnshrinkTime">300</integer>
<!-- Out of 100, the percent to shrink the workspace during spring loaded mode. -->
<integer name="config_workspaceSpringLoadShrinkPercentage">80</integer>
<!-- When items are dropped on the mini screens in customize mode, we have a bounce animation
of the bright green hover outline, and then fade out the outline at the end. These are
the values used in that animation -->
<integer name="config_screenOnDropScalePercent">120</integer>
<integer name="config_screenOnDropScaleUpDuration">200</integer>
<integer name="config_screenOnDropScaleDownDuration">200</integer>
<integer name="config_screenOnDropAlphaFadeDelay">350</integer>
<integer name="config_screenOnDropAlphaFadeDuration">50</integer>
<!-- Fade/zoom in/out duration & scale in the AllApps transition.
Note: This should be less than the workspaceShrinkTime as they happen together. -->
@ -76,15 +64,6 @@
<integer name="config_dragFadeOutAlpha">80</integer>
<integer name="config_dragFadeOutDuration">250</integer>
<!-- Workspace screens are cached to bitmaps only when they're smaller than a certain size
(maxScaleForUsingWorkspaceScreenBitmapCache), since the bitmap cache itself is smaller
than the view itself (workspaceScreenBitmapCacheScale) -->
<integer name="config_workspaceScreenBitmapCacheScale">20</integer>
<integer name="config_maxScaleForUsingWorkspaceScreenBitmapCache">50</integer>
<!-- When shrinking the workspace, this is the percentage of its original size. -->
<integer name="config_workspaceShrinkPercent">17</integer>
<!-- Folder max bounds and max number of items. Note: folder_max_count_x * folder_max_count_y
>= folder_max_num_items. When these are set to -1, they are automatically determined. -->
<integer name="folder_max_count_x">4</integer>

View File

@ -70,7 +70,6 @@
<dimen name="apps_customize_max_gap">18dp</dimen>
<dimen name="apps_customize_widget_cell_width_gap">10dp</dimen>
<dimen name="apps_customize_widget_cell_height_gap">8dp</dimen>
<dimen name="title_texture_width">120px</dimen>
<!-- height of the bottom row of controls -->
<dimen name="button_bar_height">62dip</dimen>
@ -82,21 +81,9 @@
<dimen name="button_bar_width_right_padding">0dp</dimen>
<dimen name="button_bar_height_plus_padding">70dp</dimen>
<!-- extra horizontal spacing between mini screen thumbnails ie. in all
apps and in customization mode -->
<dimen name="smallScreenExtraSpacing">0dip</dimen>
<!-- Vertical spacing between edge of screen and mini cell layouts when they
are minimized to the bottom in all apps -->
<dimen name="allAppsSmallScreenVerticalMarginLandscape">30dip</dimen>
<dimen name="allAppsSmallScreenVerticalMarginPortrait">60dip</dimen>
<!-- Drag padding to add to the bottom of drop targets -->
<dimen name="drop_target_drag_padding">14dp</dimen>
<!-- padding between the delete zone drawable and text -->
<dimen name="delete_zone_drawable_padding">8dip</dimen>
<!-- roughly a status bar (for vertically centering the all apps
home icon in landscape) -->
<dimen name="status_bar_height">25dip</dimen>

View File

@ -55,10 +55,17 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
private boolean mInTransition;
private boolean mTransitioningToWorkspace;
private boolean mResetAfterTransition;
private Runnable mRelayoutAndMakeVisible;
public AppsCustomizeTabHost(Context context, AttributeSet attrs) {
super(context, attrs);
mLayoutInflater = LayoutInflater.from(context);
mRelayoutAndMakeVisible = new Runnable() {
public void run() {
mTabs.requestLayout();
mTabsContainer.setAlpha(1f);
}
};
}
/**
@ -144,12 +151,7 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
if (contentWidth > 0 && mTabs.getLayoutParams().width != contentWidth) {
// Set the width and show the tab bar
mTabs.getLayoutParams().width = contentWidth;
post(new Runnable() {
public void run() {
mTabs.requestLayout();
mTabsContainer.setAlpha(1f);
}
});
post(mRelayoutAndMakeVisible);
}
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);

View File

@ -110,6 +110,7 @@ public class DragView extends View {
// Force a measure, because Workspace uses getMeasuredHeight() before the layout pass
int ms = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
measure(ms, ms);
mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
}
public float getOffsetY() {
@ -162,9 +163,6 @@ public class DragView extends View {
p.setColor(0xaaffffff);
canvas.drawRect(0, 0, getWidth(), getHeight(), p);
}
if (mPaint == null) {
mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
}
mHasDrawn = true;
boolean crossFade = mCrossFadeProgress > 0 && mCrossFadeBitmap != null;
@ -203,6 +201,9 @@ public class DragView extends View {
public void setPaint(Paint paint) {
mPaint = paint;
if (mPaint == null) {
mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
}
invalidate();
}
@ -213,9 +214,6 @@ public class DragView extends View {
@Override
public void setAlpha(float alpha) {
super.setAlpha(alpha);
if (mPaint == null) {
mPaint = new Paint(Paint.FILTER_BITMAP_FLAG);
}
mPaint.setAlpha((int) (255 * alpha));
invalidate();
}