Loading core/java/android/widget/Toast.java +8 −1 Original line number Diff line number Diff line Loading @@ -16,10 +16,13 @@ package android.widget; import com.android.internal.R; import android.app.INotificationManager; import android.app.ITransientNotification; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.PixelFormat; import android.os.Handler; import android.os.RemoteException; Loading Loading @@ -307,9 +310,13 @@ public class Toast { | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON; mParams.format = PixelFormat.TRANSLUCENT; mParams.windowAnimations = com.android.internal.R.attr.toastAnimation; TypedArray a = context.obtainStyledAttributes(null, R.styleable.ToastStyle); int resId = a.getResourceId(R.styleable.ToastStyle_toastAnimation, -1); mParams.windowAnimations = resId; mParams.type = WindowManager.LayoutParams.TYPE_TOAST; mParams.setTitle("Toast"); a.recycle(); } /** Loading core/java/com/tmobile/widget/ListItemTwinLabelSecondaryText.java +11 −3 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ package com.tmobile.widget; import android.content.Context; import android.content.res.TypedArray; import android.os.Debug; import android.util.AttributeSet; import android.view.LayoutInflater; import android.widget.LinearLayout; Loading @@ -27,7 +28,7 @@ public class ListItemTwinLabelSecondaryText extends LinearLayout { public ListItemTwinLabelSecondaryText(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); // Debug.stopMethodTracing(); LayoutInflater.from(context).inflate(R.layout.tmobile_list_item_twin_label_secondary_text, this, true); TypedArray a = Loading @@ -35,8 +36,10 @@ public class ListItemTwinLabelSecondaryText extends LinearLayout { mItemLabel = (TextView)findViewById(R.id.itemLabelText); String text = a.getString(R.styleable.ListItemLayout_itemLabelText); if (text != null) { if (text != null && !"".equals(text)) { mItemLabel.setText(text); } else { mItemLabel.setVisibility(GONE); } mItemText = (TextView)findViewById(R.id.itemText); Loading Loading @@ -64,7 +67,12 @@ public class ListItemTwinLabelSecondaryText extends LinearLayout { } public void setItemLabelText(CharSequence text) { if (text != null && !"".equals(text)) { mItemLabel.setText(text); mItemLabel.setVisibility(VISIBLE); } else { mItemLabel.setVisibility(GONE); } } public CharSequence getItemText() { Loading core/res/res/layout/tmobile_list_item_twin_label_secondary_text.xml +25 −17 Original line number Diff line number Diff line Loading @@ -3,38 +3,46 @@ xmlns:android="http://schemas.android.com/apk/res/android"> <LinearLayout android:layout_width="0dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" android:gravity="center|left" android:orientation="vertical" android:paddingRight="10dp"> android:orientation="horizontal"> <TextView android:layout_width="fill_parent" android:layout_width="0dp" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLabelListItem" android:singleLine="true" android:gravity="center|left" android:layout_weight="1.0" android:paddingRight="10dp" android:id="@+id/itemLabelText" /> <TextView android:layout_width="fill_parent" android:layout_width="85dp" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLabelListItem" android:id="@+id/itemLabel2Text" /> android:gravity="center|right" android:textAppearance="?android:attr/textAppearanceLabelListItemText" android:singleLine="true" android:id="@+id/itemText" /> </LinearLayout> <LinearLayout android:layout_width="85dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center|right" android:orientation="vertical" > android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_width="0dp" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLabelListItemText" android:id="@+id/itemText" /> android:textAppearance="?android:attr/textAppearanceLabelListItem" android:singleLine="true" android:gravity="center|left" android:layout_weight="1.0" android:paddingRight="10dp" android:id="@+id/itemLabel2Text" /> <TextView android:layout_width="wrap_content" android:layout_width="85dp" android:layout_height="wrap_content" android:gravity="center|right" android:textAppearance="?android:attr/textAppearanceLabelListItemText" android:singleLine="true" android:id="@+id/item2Text" /> </LinearLayout> </merge> core/res/res/values/attrs.xml +6 −1 Original line number Diff line number Diff line Loading @@ -407,13 +407,14 @@ <attr name="listItemLayoutItemTwinLabelText" format="reference" /> <attr name="listItemLabelSecondaryText" format="reference" /> <attr name="listItemTwinLabelSecondaryText" format="reference" /> <attr name="listItemHeaderTwinLabelSecondaryText" format="reference" /> <!-- ============ --> <!-- TOAST styles --> <!-- ============ --> <eat-comment /> <attr name="toastBackground" format="reference"/> <attr name="toastAnimation" format="reference"/> <attr name="toastAnimationStyle" format="reference"/> <!-- =================== --> <!-- Preference styles --> Loading Loading @@ -1535,6 +1536,7 @@ </attr> </declare-styleable> <declare-styleable name="ListItemLayout"> <attr name="itemHeaderLabelText" format="string" /> <attr name="itemLabelText" format="string" /> <attr name="itemLabel2Text" format="string" /> <attr name="itemText" format="string" /> Loading @@ -1555,6 +1557,9 @@ </attr> <attr name="gravity" /> </declare-styleable> <declare-styleable name="ToastStyle"> <attr name="toastAnimation" format="reference" /> </declare-styleable> <declare-styleable name="ImageSwitcher"> </declare-styleable> <declare-styleable name="ImageView"> Loading core/res/res/values/styles.xml +6 −0 Original line number Diff line number Diff line Loading @@ -807,6 +807,12 @@ <style name="Widget.ListItemLayout.ItemTwinLabelSecondaryText" > <item name="android:minHeight">80dp</item> <item name="android:gravity">left|center_vertical</item> <item name="android:orientation">vertical</item> </style> <style name="Widget.ListItemLayout.ItemHeaderTwinLabelSecondaryText" > <item name="android:minHeight">100dp</item> <item name="android:gravity">left|center_vertical</item> <item name="android:orientation">vertical</item> </style> <style name="TextAppearance.Label"> Loading Loading
core/java/android/widget/Toast.java +8 −1 Original line number Diff line number Diff line Loading @@ -16,10 +16,13 @@ package android.widget; import com.android.internal.R; import android.app.INotificationManager; import android.app.ITransientNotification; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.PixelFormat; import android.os.Handler; import android.os.RemoteException; Loading Loading @@ -307,9 +310,13 @@ public class Toast { | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON; mParams.format = PixelFormat.TRANSLUCENT; mParams.windowAnimations = com.android.internal.R.attr.toastAnimation; TypedArray a = context.obtainStyledAttributes(null, R.styleable.ToastStyle); int resId = a.getResourceId(R.styleable.ToastStyle_toastAnimation, -1); mParams.windowAnimations = resId; mParams.type = WindowManager.LayoutParams.TYPE_TOAST; mParams.setTitle("Toast"); a.recycle(); } /** Loading
core/java/com/tmobile/widget/ListItemTwinLabelSecondaryText.java +11 −3 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ package com.tmobile.widget; import android.content.Context; import android.content.res.TypedArray; import android.os.Debug; import android.util.AttributeSet; import android.view.LayoutInflater; import android.widget.LinearLayout; Loading @@ -27,7 +28,7 @@ public class ListItemTwinLabelSecondaryText extends LinearLayout { public ListItemTwinLabelSecondaryText(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); // Debug.stopMethodTracing(); LayoutInflater.from(context).inflate(R.layout.tmobile_list_item_twin_label_secondary_text, this, true); TypedArray a = Loading @@ -35,8 +36,10 @@ public class ListItemTwinLabelSecondaryText extends LinearLayout { mItemLabel = (TextView)findViewById(R.id.itemLabelText); String text = a.getString(R.styleable.ListItemLayout_itemLabelText); if (text != null) { if (text != null && !"".equals(text)) { mItemLabel.setText(text); } else { mItemLabel.setVisibility(GONE); } mItemText = (TextView)findViewById(R.id.itemText); Loading Loading @@ -64,7 +67,12 @@ public class ListItemTwinLabelSecondaryText extends LinearLayout { } public void setItemLabelText(CharSequence text) { if (text != null && !"".equals(text)) { mItemLabel.setText(text); mItemLabel.setVisibility(VISIBLE); } else { mItemLabel.setVisibility(GONE); } } public CharSequence getItemText() { Loading
core/res/res/layout/tmobile_list_item_twin_label_secondary_text.xml +25 −17 Original line number Diff line number Diff line Loading @@ -3,38 +3,46 @@ xmlns:android="http://schemas.android.com/apk/res/android"> <LinearLayout android:layout_width="0dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" android:gravity="center|left" android:orientation="vertical" android:paddingRight="10dp"> android:orientation="horizontal"> <TextView android:layout_width="fill_parent" android:layout_width="0dp" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLabelListItem" android:singleLine="true" android:gravity="center|left" android:layout_weight="1.0" android:paddingRight="10dp" android:id="@+id/itemLabelText" /> <TextView android:layout_width="fill_parent" android:layout_width="85dp" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLabelListItem" android:id="@+id/itemLabel2Text" /> android:gravity="center|right" android:textAppearance="?android:attr/textAppearanceLabelListItemText" android:singleLine="true" android:id="@+id/itemText" /> </LinearLayout> <LinearLayout android:layout_width="85dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center|right" android:orientation="vertical" > android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_width="0dp" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLabelListItemText" android:id="@+id/itemText" /> android:textAppearance="?android:attr/textAppearanceLabelListItem" android:singleLine="true" android:gravity="center|left" android:layout_weight="1.0" android:paddingRight="10dp" android:id="@+id/itemLabel2Text" /> <TextView android:layout_width="wrap_content" android:layout_width="85dp" android:layout_height="wrap_content" android:gravity="center|right" android:textAppearance="?android:attr/textAppearanceLabelListItemText" android:singleLine="true" android:id="@+id/item2Text" /> </LinearLayout> </merge>
core/res/res/values/attrs.xml +6 −1 Original line number Diff line number Diff line Loading @@ -407,13 +407,14 @@ <attr name="listItemLayoutItemTwinLabelText" format="reference" /> <attr name="listItemLabelSecondaryText" format="reference" /> <attr name="listItemTwinLabelSecondaryText" format="reference" /> <attr name="listItemHeaderTwinLabelSecondaryText" format="reference" /> <!-- ============ --> <!-- TOAST styles --> <!-- ============ --> <eat-comment /> <attr name="toastBackground" format="reference"/> <attr name="toastAnimation" format="reference"/> <attr name="toastAnimationStyle" format="reference"/> <!-- =================== --> <!-- Preference styles --> Loading Loading @@ -1535,6 +1536,7 @@ </attr> </declare-styleable> <declare-styleable name="ListItemLayout"> <attr name="itemHeaderLabelText" format="string" /> <attr name="itemLabelText" format="string" /> <attr name="itemLabel2Text" format="string" /> <attr name="itemText" format="string" /> Loading @@ -1555,6 +1557,9 @@ </attr> <attr name="gravity" /> </declare-styleable> <declare-styleable name="ToastStyle"> <attr name="toastAnimation" format="reference" /> </declare-styleable> <declare-styleable name="ImageSwitcher"> </declare-styleable> <declare-styleable name="ImageView"> Loading
core/res/res/values/styles.xml +6 −0 Original line number Diff line number Diff line Loading @@ -807,6 +807,12 @@ <style name="Widget.ListItemLayout.ItemTwinLabelSecondaryText" > <item name="android:minHeight">80dp</item> <item name="android:gravity">left|center_vertical</item> <item name="android:orientation">vertical</item> </style> <style name="Widget.ListItemLayout.ItemHeaderTwinLabelSecondaryText" > <item name="android:minHeight">100dp</item> <item name="android:gravity">left|center_vertical</item> <item name="android:orientation">vertical</item> </style> <style name="TextAppearance.Label"> Loading