ActionFragment
android:layout_width="match_parent"
android:layout_height="match_parent">
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
app:circle_color="@color/action_button"
app:circle_radius="45dp"
app:circle_border_width="0dp"/>
.../>
/wear/src/main/res/layout/fragment_action.xml
public class ActionFragment extends BaseFragment implements
View.OnClickListener {
public static ActionFragment create(int iconResId, int
labelResId, Listener listener) {}
@Override
public void onViewCreated(View view, Bundle
savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
vIcon.setImageResource(getArguments().getInt("ICON"));
vLabel.setText(getArguments().getInt("LABEL"));
view.setOnClickListener(this);
}
@Override
public void onClick(View v) {
mListener.onActionPerformed();}
public interface Listener {
public void onActionPerformed();
}
} /wear/src/main/java/cz/destil/wearsquare/fragment/ActionFragment.java