次のリンクを見つけました: http://clickclickclack.wordpress.com/2012/01/03/intercepting-androids-action_send-intents/
この種のタスクを実行する方法が説明されています。行レイアウトを作成するだけで完了です。私はそれを試してみましたが、うまくいきます!
編集:show
関数
の記事に誤りがあります。次のようにする必要があります。
final ShareIntentListAdapter adapter = new ShareIntentListAdapter((Activity)context, R.layout.basiclistview, activities.toArray());
それについて言及してくれた@imram khanに感謝します。
誰かが私の xml 行レイアウトを使用したい場合:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView android:id="@+id/text1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="20sp"
android:gravity="center"
android:layout_alignParentRight="true"
android:layout_marginRight="50dp"
/>
<ImageView android:id="@+id/logo2"
android:layout_width="70dp"
android:layout_height="70dp"
android:padding="10dp"
android:src="@drawable/number1"
android:layout_gravity="center_vertical"
android:layout_alignParentRight="true"/>
</RelativeLayout>