am bebefaac: Merge "Fixing up keyguard widget pager layouts" into jb-mr1-dev
* commit 'bebefaac17801a375244fca0ae856f4c2f56f702': Fixing up keyguard widget pager layouts
This commit is contained in:
@@ -28,17 +28,16 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<include layout="@layout/keyguard_widget_region"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="230dip"
|
||||
android:layout_weight=".45"/>
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight=".45" />
|
||||
|
||||
<com.android.internal.policy.impl.keyguard.KeyguardSecurityViewFlipper
|
||||
android:id="@+id/view_flipper"
|
||||
android:layout_width="0dip"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.55"
|
||||
android:layout_marginLeft="8dip"
|
||||
android:layout_marginRight="8dip"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:gravity="center">
|
||||
|
||||
<!-- SelectorView is always used, so add it here. The rest are loaded dynamically -->
|
||||
|
||||
@@ -37,4 +37,4 @@
|
||||
android:textSize="12sp"
|
||||
android:background="#99FFFFFF"
|
||||
android:textColor="#ff000000"/>
|
||||
</com.android.internal.policy.impl.keyguard.KeyguardMultiUserAvatar>
|
||||
</com.android.internal.policy.impl.keyguard.KeyguardMultiUserAvatar>
|
||||
|
||||
@@ -29,10 +29,7 @@
|
||||
<include layout="@layout/keyguard_widget_region"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="0.45"
|
||||
android:layout_marginTop="35dip"
|
||||
android:layout_marginLeft="33dip"
|
||||
android:layout_marginRight="33dip"/>
|
||||
android:layout_weight="0.45" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
<!-- This is a view that shows general status information in Keyguard. -->
|
||||
<com.android.internal.policy.impl.keyguard.KeyguardWidgetFrame
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/keyguard_status_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/keyguard_status_view"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<com.android.internal.policy.impl.keyguard.KeyguardStatusView
|
||||
|
||||
@@ -25,43 +25,47 @@
|
||||
android:visibility="gone"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1" />
|
||||
<com.android.internal.policy.impl.keyguard.KeyguardWidgetPager
|
||||
android:id="@+id/app_widget_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/kg_widget_container_height">
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
<!-- TODO: Remove this when supported as a widget -->
|
||||
<include layout="@layout/keyguard_status_view"/>
|
||||
<include layout="@layout/keyguard_transport_control_view"/>
|
||||
</com.android.internal.policy.impl.keyguard.KeyguardWidgetPager>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
android:layout_height="10dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="@dimen/kg_widget_pager_horizontal_padding"
|
||||
android:paddingRight="@dimen/kg_widget_pager_horizontal_padding">
|
||||
<com.android.internal.policy.impl.keyguard.KeyguardGlowStripView
|
||||
android:id="@+id/left_strip"
|
||||
android:layout_width="0dip"
|
||||
android:paddingTop="@dimen/kg_runway_lights_vertical_padding"
|
||||
android:paddingBottom="@dimen/kg_runway_lights_vertical_padding"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
prvandroid:numDots="5"
|
||||
prvandroid:dotSize="7dip"
|
||||
prvandroid:dotSize="@dimen/kg_runway_lights_height"
|
||||
prvandroid:leftToRight="false"
|
||||
prvandroid:glowDot="@*android:drawable/ic_lockscreen_glowdot" />
|
||||
<Space
|
||||
android:layout_width="0dip"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.6"/>
|
||||
<com.android.internal.policy.impl.keyguard.KeyguardGlowStripView
|
||||
android:id="@+id/right_strip"
|
||||
android:layout_width="0dip"
|
||||
android:paddingTop="@dimen/kg_runway_lights_vertical_padding"
|
||||
android:paddingBottom="@dimen/kg_runway_lights_vertical_padding"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
prvandroid:numDots="5"
|
||||
prvandroid:dotSize="7dip"
|
||||
prvandroid:dotSize="@dimen/kg_runway_lights_height"
|
||||
prvandroid:leftToRight="true"
|
||||
prvandroid:glowDot="@*android:drawable/ic_lockscreen_glowdot" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -254,9 +254,6 @@
|
||||
<!-- Height of widget view in keyguard. -->
|
||||
<dimen name="kg_widget_view_height">0dp</dimen>
|
||||
|
||||
<!-- Padding surrounding each widget page -->
|
||||
<dimen name="kg_widget_page_padding">10dp</dimen>
|
||||
|
||||
<!-- Size of the clock font in keyguard's status view -->
|
||||
<dimen name="kg_status_clock_font_size">94dp</dimen>
|
||||
|
||||
@@ -285,8 +282,20 @@
|
||||
<!-- Space reserved at the bottom of secure views (pin/pattern/password/SIM pin/SIM puk) -->
|
||||
<dimen name="kg_secure_padding_height">46dp</dimen>
|
||||
|
||||
<!-- The height of the widget container -->
|
||||
<dimen name="kg_widget_container_height">200dp</dimen>
|
||||
<!-- The height of the runway lights strip -->
|
||||
<dimen name="kg_runway_lights_height">7dp</dimen>
|
||||
|
||||
<!-- The height of the runway lights strip -->
|
||||
<dimen name="kg_runway_lights_vertical_padding">3dp</dimen>
|
||||
|
||||
<!-- Horizontal padding for the widget pager -->
|
||||
<dimen name="kg_widget_pager_horizontal_padding">16dp</dimen>
|
||||
|
||||
<!-- Top padding for the widget pager -->
|
||||
<dimen name="kg_widget_pager_top_padding">16dp</dimen>
|
||||
|
||||
<!-- Bottom padding for the widget pager -->
|
||||
<dimen name="kg_widget_pager_bottom_padding">6dp</dimen>
|
||||
|
||||
<!-- Touch slop for the global toggle accessibility gesture -->
|
||||
<dimen name="accessibility_touch_slop">80dip</dimen>
|
||||
|
||||
@@ -1185,7 +1185,9 @@
|
||||
<java-symbol type="dimen" name="navigation_bar_height_landscape" />
|
||||
<java-symbol type="dimen" name="navigation_bar_width" />
|
||||
<java-symbol type="dimen" name="status_bar_height" />
|
||||
<java-symbol type="dimen" name="kg_widget_page_padding" />
|
||||
<java-symbol type="dimen" name="kg_widget_pager_horizontal_padding" />
|
||||
<java-symbol type="dimen" name="kg_widget_pager_top_padding" />
|
||||
<java-symbol type="dimen" name="kg_widget_pager_bottom_padding" />
|
||||
<java-symbol type="drawable" name="ic_jog_dial_sound_off" />
|
||||
<java-symbol type="drawable" name="ic_jog_dial_sound_on" />
|
||||
<java-symbol type="drawable" name="ic_jog_dial_unlock" />
|
||||
|
||||
@@ -33,7 +33,6 @@ import com.android.internal.R;
|
||||
public class KeyguardWidgetFrame extends FrameLayout {
|
||||
private final static PorterDuffXfermode sAddBlendMode =
|
||||
new PorterDuffXfermode(PorterDuff.Mode.ADD);
|
||||
private static int sWidgetPagePadding;
|
||||
private static Drawable sLeftOverscrollDrawable;
|
||||
private static Drawable sRightOverscrollDrawable;
|
||||
|
||||
@@ -52,13 +51,16 @@ public class KeyguardWidgetFrame extends FrameLayout {
|
||||
|
||||
public KeyguardWidgetFrame(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
Resources res = context.getResources();
|
||||
if (sLeftOverscrollDrawable == null) {
|
||||
Resources res = context.getResources();
|
||||
sLeftOverscrollDrawable = res.getDrawable(R.drawable.kg_widget_overscroll_layer_left);
|
||||
sRightOverscrollDrawable = res.getDrawable(R.drawable.kg_widget_overscroll_layer_right);
|
||||
sWidgetPagePadding = res.getDimensionPixelSize(R.dimen.kg_widget_page_padding);
|
||||
}
|
||||
setPadding(sWidgetPagePadding, sWidgetPagePadding, sWidgetPagePadding, sWidgetPagePadding);
|
||||
|
||||
int hPadding = res.getDimensionPixelSize(R.dimen.kg_widget_pager_horizontal_padding);
|
||||
int topPadding = res.getDimensionPixelSize(R.dimen.kg_widget_pager_top_padding);
|
||||
int bottomPadding = res.getDimensionPixelSize(R.dimen.kg_widget_pager_bottom_padding);
|
||||
setPadding(hPadding, topPadding, hPadding, bottomPadding);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,8 +78,8 @@ public class KeyguardWidgetFrame extends FrameLayout {
|
||||
@Override
|
||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||
super.onSizeChanged(w, h, oldw, oldh);
|
||||
mForegroundRect.set(sWidgetPagePadding, sWidgetPagePadding,
|
||||
w - sWidgetPagePadding, h - sWidgetPagePadding);
|
||||
mForegroundRect.set(getPaddingLeft(), getPaddingTop(),
|
||||
w - getPaddingRight(), h - getPaddingBottom());
|
||||
}
|
||||
|
||||
void setOverScrollAmount(float r, boolean left) {
|
||||
|
||||
Reference in New Issue
Block a user