Skip to content

Commit f3b9ec8

Browse files
author
Winson Chung
committed
Initial changes to allow dropping on delete target to remove widget.
- Fixing deletion animation Change-Id: Ie93991c0e9af0c6b64c6b3808e38f349f6845965
1 parent febea58 commit f3b9ec8

File tree

14 files changed

+337
-80
lines changed

14 files changed

+337
-80
lines changed
1003 Bytes
Loading
802 Bytes
Loading
1.36 KB
Loading

core/res/res/layout-land/keyguard_host_view.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
android:layout_height="match_parent"
3434
android:clipChildren="false">
3535

36+
<include layout="@layout/keyguard_widget_remove_drop_target"
37+
android:id="@+id/keyguard_widget_pager_delete_target"
38+
android:layout_width="wrap_content"
39+
android:layout_height="wrap_content"
40+
android:layout_gravity="top|center_horizontal" />
41+
3642
<include layout="@layout/keyguard_widget_pager"
3743
android:id="@+id/app_widget_container"
3844
android:layout_width="match_parent"

core/res/res/layout-land/keyguard_widget_pager.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
android:paddingRight="25dp"
2626
android:paddingTop="25dp"
2727
android:paddingBottom="25dp"
28-
android:clipChildren="false"
2928
android:clipToPadding="false"
3029
androidprv:pageSpacing="10dp">
3130
</com.android.internal.policy.impl.keyguard.KeyguardWidgetCarousel>

core/res/res/layout-port/keyguard_host_view.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@
3333
android:layout_width="match_parent"
3434
android:layout_height="match_parent">
3535

36+
<FrameLayout
37+
android:layout_width="match_parent"
38+
android:layout_height="wrap_content">
39+
<include layout="@layout/keyguard_widget_remove_drop_target"
40+
android:id="@+id/keyguard_widget_pager_delete_target"
41+
android:layout_width="wrap_content"
42+
android:layout_height="wrap_content"
43+
android:layout_gravity="top|center_horizontal" />
44+
</FrameLayout>
45+
3646
<FrameLayout
3747
android:layout_width="match_parent"
3848
android:layout_height="match_parent"

core/res/res/layout-port/keyguard_widget_pager.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
android:paddingRight="25dp"
2727
android:paddingTop="25dp"
2828
android:paddingBottom="@dimen/kg_widget_pager_bottom_padding"
29-
android:clipChildren="false"
3029
android:clipToPadding="false"
3130
androidprv:pageSpacing="10dp">
3231
</com.android.internal.policy.impl.keyguard.KeyguardWidgetPager>

core/res/res/layout-sw600dp-port/keyguard_host_view.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
android:clipChildren="false"
3535
android:orientation="vertical">
3636

37+
<include layout="@layout/keyguard_widget_remove_drop_target"
38+
android:id="@+id/keyguard_widget_pager_delete_target"
39+
android:layout_width="wrap_content"
40+
android:layout_height="wrap_content"
41+
android:layout_gravity="top|center_horizontal" />
42+
3743
<include layout="@layout/keyguard_widget_pager"
3844
android:id="@+id/app_widget_container"
3945
android:layout_width="match_parent"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
**
4+
** Copyright 2012, The Android Open Source Project
5+
**
6+
** Licensed under the Apache License, Version 2.0 (the "License")
7+
** you may not use this file except in compliance with the License.
8+
** You may obtain a copy of the License at
9+
**
10+
** http://www.apache.org/licenses/LICENSE-2.0
11+
**
12+
** Unless required by applicable law or agreed to in writing, software
13+
** distributed under the License is distributed on an "AS IS" BASIS,
14+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
** See the License for the specific language governing permissions and
16+
** limitations under the License.
17+
*/
18+
-->
19+
<TextView
20+
xmlns:android="http://schemas.android.com/apk/res/android"
21+
android:gravity="center"
22+
android:padding="20dp"
23+
android:paddingLeft="40dp"
24+
android:paddingRight="40dp"
25+
android:drawableLeft="@drawable/kg_widget_delete_drop_target"
26+
android:drawablePadding="4dp"
27+
android:textColor="#FFF"
28+
android:textSize="13sp"
29+
android:shadowColor="#000"
30+
android:shadowDy="1.0"
31+
android:shadowRadius="1.0"
32+
android:visibility="gone" />

core/res/res/values/symbols.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,7 @@
13191319
<java-symbol type="id" name="keyguard_sim_puk_view" />
13201320
<java-symbol type="id" name="keyguard_account_view" />
13211321
<java-symbol type="id" name="keyguard_selector_fade_container" />
1322+
<java-symbol type="id" name="keyguard_widget_pager_delete_target" />
13221323
<java-symbol type="id" name="app_widget_container" />
13231324
<java-symbol type="id" name="view_flipper" />
13241325
<java-symbol type="id" name="emergency_call_button" />

0 commit comments

Comments
 (0)