- Also fixing spacing in the portrait mode, and using the same styles for both AllApps and workspace icons.
Change-Id: I222dd5d53a39d6940a85f40b57912b69c926ffd0
launcher:cellHeight="@dimen/workspace_cell_height"
launcher:widthGap="@dimen/workspace_width_gap"
launcher:heightGap="@dimen/workspace_height_gap"
- launcher:yAxisStartPadding="40dip"
- launcher:yAxisEndPadding="40dip"
+ launcher:yAxisStartPadding="25dip"
+ launcher:yAxisEndPadding="25dip"
launcher:xAxisStartPadding="40dip"
launcher:xAxisEndPadding="40dip" />
launcher:outlineColor="#FF8CD2FF"
launcher:checkedBlurColor="#FFBBE83C"
launcher:checkedOutlineColor="#FF8CD2FF"
- launcher:scaledIconSize="64dp"
android:id="@+id/application_icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
- android:paddingTop="2dip"
- android:textColor="#FFFFFFFF"
- android:textSize="13sp"
- android:shadowColor="#FF000000"
- android:shadowDx="0.0"
- android:shadowDy="1.0"
- android:shadowRadius="1.0"
-
- android:maxLines="2"
- android:fadingEdge="horizontal" />
+ style="@style/WorkspaceIcon.Portrait" />
<!-- Width/height gap overrides for the workspace -->
<dimen name="workspace_width_gap">16dp</dimen>
- <dimen name="workspace_height_gap">0dp</dimen>
+ <dimen name="workspace_height_gap">5dp</dimen>
</resources>
\ No newline at end of file
<resources>
<!-- Width/height gap overrides for the workspace -->
<dimen name="workspace_width_gap">0dp</dimen>
- <dimen name="workspace_height_gap">16dp</dimen>
+ <dimen name="workspace_height_gap">32dp</dimen>
</resources>
\ No newline at end of file
<!-- The corner radius to draw the external drop icon rounded rect -->
<dimen name="external_drop_icon_rect_radius">10dp</dimen>
+
+ <!-- Temporary scaled icon size -->
+ <dimen name="temp_scaled_icon_size">72dp</dimen>
<!-- extra horizontal spacing between mini screen thumbnails ie. in all
apps and in customization mode -->
</style>
<style name="WorkspaceIcon.Portrait">
- <item name="android:drawablePadding">4dip</item>
+ <item name="android:drawablePadding">0dip</item>
<item name="android:paddingTop">1dip</item>
</style>
<style name="WorkspaceIcon.Landscape">
- <item name="android:drawablePadding">4dip</item>
+ <item name="android:drawablePadding">0dip</item>
<item name="android:paddingTop">1dip</item>
</style>
</resources>
<attr name="checkedBlurColor" format="color" />
<!-- The checked outline color of the holographic outline -->
<attr name="checkedOutlineColor" format="color" />
- <!-- The scaled icon dimension -->
- <attr name="scaledIconSize" format="dimension" />
</declare-styleable>
<!-- PagedViewWidgetIcon specific attributes. These attributes are used to
View createShortcut(int layoutResId, ViewGroup parent, ShortcutInfo info) {
TextView favorite = (TextView) mInflater.inflate(layoutResId, parent, false);
+ // Temporarily, we are scaling up all shortcuts on the workspace
+ int scaledSize = parent.getResources().getDimensionPixelSize(R.dimen.temp_scaled_icon_size);
+ Bitmap b = Bitmap.createScaledBitmap(info.getIcon(mIconCache), scaledSize, scaledSize, true);
+
favorite.setCompoundDrawablesWithIntrinsicBounds(null,
- new FastBitmapDrawable(info.getIcon(mIconCache)),
+ new FastBitmapDrawable(b),
null, null);
favorite.setText(info.title);
favorite.setTag(info);
mHoloOutlineColor = a.getColor(R.styleable.PagedViewIcon_outlineColor, 0);
mCheckedBlurColor = a.getColor(R.styleable.PagedViewIcon_checkedBlurColor, 0);
mCheckedOutlineColor = a.getColor(R.styleable.PagedViewIcon_checkedOutlineColor, 0);
- mScaledIconSize = a.getDimensionPixelSize(R.styleable.PagedViewIcon_scaledIconSize, 64);
+ mScaledIconSize =
+ context.getResources().getDimensionPixelSize(R.dimen.temp_scaled_icon_size);
+
a.recycle();
if (sHolographicOutlineHelper == null) {