0
私のアプリ内でこの種のボタンを作成することが可能かどうかを知りたい(リンク上のような通知なし)。 ActionPage:通知なしのアクションボタン - Wear
http://developer.android.com/training/wearables/notifications/creating.html
私のアプリ内でこの種のボタンを作成することが可能かどうかを知りたい(リンク上のような通知なし)。 ActionPage:通知なしのアクションボタン - Wear
http://developer.android.com/training/wearables/notifications/creating.html
は、このビューを使用することができます。下のテキスト、内側のアイコン、クリック時に実行するアクションなどを設定することができます。詳細はドキュメントを参照してください。
<android.support.wearable.view.ActionPage
android:id="@+id/action_page"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:maxLines="1"
android:textColor="@color/st_grey" />
IはGridViewPagerでそれを使用する: ここ例であり、それは断片でした。
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_action, container, false);
ActionPage actionPage = (ActionPage) view.findViewById(R.id.action_page);
actionPage.setText(actionText);
actionPage.setImageResource(iconResId);
actionPage.setOnClickListener(onClickListener);
return view;
}