diff options
author | Artem Shvadskiy <ashvadskiy@cyngn.com> | 2015-12-02 16:05:01 -0800 |
---|---|---|
committer | Artem Shvadskiy <ashvadskiy@cyngn.com> | 2015-12-21 12:04:03 -0800 |
commit | b7121babd1abedc085244a5145052ad453ce86a6 (patch) | |
tree | 30cd03d013c41ccaaf4a5de3feccfff7d2aa0082 /res/layout | |
parent | acf61e0834d2c0f605a3abc6fde86f0866a8b5a2 (diff) | |
download | android_packages_apps_Trebuchet-b7121babd1abedc085244a5145052ad453ce86a6.tar.gz android_packages_apps_Trebuchet-b7121babd1abedc085244a5145052ad453ce86a6.tar.bz2 android_packages_apps_Trebuchet-b7121babd1abedc085244a5145052ad453ce86a6.zip |
Add remote apps to application drawer.
Patch 2:
1. Use isRemote() method instead of checking flag manually.
2. Launch remote app directly through intent, bypassing regular app logic.
3. Pull syncing code out of LauncherModel and into RemoteFolderManager.
4. Check setting before loading apps.
5. Delete old apps before loading new ones.
6. Add/remove directly from AppDrawerListAdapter, since we are not sure
if we want remote apps to show up in Google-style paged drawer.
7. Get number of columns for drawer, so we always load just enough
to fill one row.
Patch 3: Remove old ArrayList from LauncherModel.
Patch 4:
1. Update redlines.
2. Clean up layout/dimens.
3. Add custom scrubber icon for remote apps.
4. Apply custom styles to remote header.
TODO: Implement info icon click event, and replace remote apps based
on updater cache status.
Patch 5: Clean up app_drawer_item.xml
Patch 6: Rebase.
Patch 7:
1. Add forgotten rebase method to RemoteFolderManager stub.
2. Apply default styles to app_drawer_item and don't bother
checking to apply styles unless remote folder is enabled.
3. Minor redline fix.
Patch 8: Add larger bottom margin to remote header.
Patch 9:
1. Create new view type for custom header to avoid on click bug.
2. Refactor custom style to apply on view holder creation,
instead of on bind.
3. Add click event for custom header icon.
Change-Id: If123d7ac82a0af0fa171fa3408b6c2f1f8a48b7b
issue-id: CYNGNOS-1380
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/app_drawer_item.xml | 78 |
1 files changed, 51 insertions, 27 deletions
diff --git a/res/layout/app_drawer_item.xml b/res/layout/app_drawer_item.xml index 7322b73e3..d8b3eb43e 100644 --- a/res/layout/app_drawer_item.xml +++ b/res/layout/app_drawer_item.xml @@ -15,57 +15,81 @@ limitations under the License. --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:autofit="http://schemas.android.com/apk/res-auto" - android:splitMotionEvents="false" - android:layout_width="match_parent" - android:layout_height="wrap_content"> + xmlns:autofit="http://schemas.android.com/apk/res-auto" + android:splitMotionEvents="false" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <!-- Layout in back to front render order --> <View android:id="@+id/fading_background_back" android:alpha="0" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:layout_alignTop="@+id/drawer_item_flow" + android:layout_alignParentTop="true" android:layout_alignBottom="@+id/drawer_item_flow" android:background="@color/app_drawer_drag_background" /> - <!-- Layout in back to front render order --> + <TextView + android:id="@+id/custom_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@android:color/white" + android:textSize="@dimen/drawer_custom_title_text_size" + android:layout_marginStart="@dimen/drawer_custom_title_margin_start" + android:layout_marginTop="@dimen/drawer_custom_title_margin_top" + android:includeFontPadding="false" + android:fontFamily="roboto-light" + android:text="@string/recommendations_title" + android:visibility="gone" /> + + <ImageView + android:id="@+id/custom_title_icon" + android:layout_width="@dimen/drawer_custom_icon_size" + android:layout_height="@dimen/drawer_custom_icon_size" + android:layout_marginEnd="@dimen/drawer_custom_icon_margin_end" + android:layout_marginTop="@dimen/drawer_custom_icon_margin_top" + android:layout_alignParentEnd="true" + android:src="@drawable/triangle_icon" + android:visibility="gone" /> + <LinearLayout - android:id="@+id/drawer_item_flow" - android:layout_alignParentEnd="true" - android:layout_toEndOf="@+id/drawer_item_title" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" /> + android:id="@+id/drawer_item_flow" + android:layout_alignParentEnd="true" + android:layout_toEndOf="@+id/drawer_item_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@id/custom_title" + android:orientation="horizontal" /> <View android:id="@+id/fading_background_front" android:alpha="0" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:layout_alignTop="@id/drawer_item_flow" + android:layout_alignParentTop="true" android:layout_alignBottom="@id/drawer_item_flow" android:background="@color/app_drawer_drag_background" /> <com.android.launcher3.AutoFitTextView - android:id="@+id/drawer_item_title" - android:layout_width="@dimen/app_drawer_char_width" - android:layout_height="fill_parent" - android:layout_marginTop="6dp" - android:layout_marginBottom="24dp" - android:layout_marginStart="6dp" - android:layout_alignTop="@id/drawer_item_flow" + android:id="@id/drawer_item_title" + android:layout_width="@dimen/drawer_header_text_char_width" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/drawer_header_text_margin_top_default" + android:layout_marginBottom="@dimen/drawer_header_text_margin_bottom" + android:layout_marginStart="@dimen/drawer_header_text_margin_start" + android:layout_alignTop="@id/custom_title" + android:layout_alignWithParentIfMissing="true" android:layout_alignBottom="@id/drawer_item_flow" - android:layout_centerVertical="true" android:includeFontPadding="false" android:gravity="center" android:singleLine="true" - autofit:minTextSize="8sp" - android:textSize="24sp" - android:layout_gravity="center" + autofit:minTextSize="@dimen/drawer_header_text_min_text_size" + android:textSize="@dimen/drawer_header_text_size_default" android:fontFamily="sans-serif-light" android:textColor="@android:color/white" - android:shadowRadius="4.0" - android:shadowDy="2" - android:shadowColor="#b0000000"/> + android:shadowRadius="@dimen/drawer_header_text_shadow_radius" + android:shadowDy="@dimen/drawer_header_text_shadow_dy" + android:shadowColor="@color/drawer_header_text_shadow"/> </RelativeLayout> |