나는 이것을 시도하지 않았지만 위젯이 RemoteViews.setOnClickPendingIntent를 사용하는 것과 같은 방식으로 작동해야합니다. 행의 선택 강조 표시를 사용 중지하는 한 가지 방법은 클릭 인 텐트를 외부 레이아웃 요소에 추가 한 다음 아무 것도하지 않는 것입니다.
예를 들어 맞춤 레이아웃이 다음과 같이 보이는 경우
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_root"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:src="@drawable/button"/>
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="Some Text" />
</LinearLayout>
의 layout_root에 BTW
RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.yourlayout);
notification.contentView = contentView;
PendingIntent peClick = PendingIntent.getBroadcast(this, 0, new Intent("com.BUTTON_CLICK"), 0);
contentView.setOnClickPendingIntent(R.id.button, peClick);
PendingIntent peNothing = PendingIntent.getBroadcast(this, 0, new Intent("com.DO_NOTHING"), 0);
contentView.setOnClickPendingIntent(R.id.layout_root, peNothing);
을 do_nothing 의도를 추가, HTC는 자신의 물건을 사용하는 일반 개발자는, 그래서 항상 좋은 아니에요 수없는 방법으로 안드로이드를 수정할 수있는 기능을 가지고 가능한 일의 예로
fyi- 허니 콤이 나누기를 설정합니다. HoneyComb에서 작동합니다. – Falcon