Loading packages/SystemUI/src/com/android/systemui/statusbar/LatestItemView.java +0 −11 Original line number Diff line number Diff line Loading @@ -23,22 +23,11 @@ import android.view.MotionEvent; import android.widget.FrameLayout; public class LatestItemView extends FrameLayout { private boolean mDispatchTorches; public LatestItemView(Context context, AttributeSet attrs) { super(context, attrs); } public boolean dispatchTouchEvent(MotionEvent ev) { if (mDispatchTorches) { return super.dispatchTouchEvent(ev); } else { return onTouchEvent(ev); } } public void setOnClickListener(OnClickListener l) { mDispatchTorches = l == null; super.setOnClickListener(l); } } tests/StatusBar/res/layout/button_notification.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="80sp" android:orientation="horizontal" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:src="@drawable/icon1" /> <Button android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="button" /> </LinearLayout> tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java +13 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,19 @@ public class NotificationTestList extends TestActivity } }, new Test("Button") { public void run() { Notification n = new Notification(R.drawable.icon1, null, mActivityCreateTime); n.contentView = new RemoteViews(getPackageName(), R.layout.button_notification); n.flags |= Notification.FLAG_ONGOING_EVENT; n.contentIntent = makeIntent(); n.contentView.setOnClickPendingIntent(R.id.button, makeIntent2()); mNM.notify(1, n); } }, new Test("custom intent on text view") { public void run() { Notification n = new Notification(R.drawable.icon1, null, Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/LatestItemView.java +0 −11 Original line number Diff line number Diff line Loading @@ -23,22 +23,11 @@ import android.view.MotionEvent; import android.widget.FrameLayout; public class LatestItemView extends FrameLayout { private boolean mDispatchTorches; public LatestItemView(Context context, AttributeSet attrs) { super(context, attrs); } public boolean dispatchTouchEvent(MotionEvent ev) { if (mDispatchTorches) { return super.dispatchTouchEvent(ev); } else { return onTouchEvent(ev); } } public void setOnClickListener(OnClickListener l) { mDispatchTorches = l == null; super.setOnClickListener(l); } }
tests/StatusBar/res/layout/button_notification.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="80sp" android:orientation="horizontal" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:src="@drawable/icon1" /> <Button android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="button" /> </LinearLayout>
tests/StatusBar/src/com/android/statusbartest/NotificationTestList.java +13 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,19 @@ public class NotificationTestList extends TestActivity } }, new Test("Button") { public void run() { Notification n = new Notification(R.drawable.icon1, null, mActivityCreateTime); n.contentView = new RemoteViews(getPackageName(), R.layout.button_notification); n.flags |= Notification.FLAG_ONGOING_EVENT; n.contentIntent = makeIntent(); n.contentView.setOnClickPendingIntent(R.id.button, makeIntent2()); mNM.notify(1, n); } }, new Test("custom intent on text view") { public void run() { Notification n = new Notification(R.drawable.icon1, null, Loading