android.support.design.widget.CheckableImageButton Java Examples
The following examples show how to use
android.support.design.widget.CheckableImageButton.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MapImageViewFragment.java From dhis2-android-dashboard with BSD 3-Clause "New" or "Revised" License | 6 votes |
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { viewBaseMapButton = (CheckableImageButton) view.findViewById(R.id.view_base_map_button); viewBaseMapButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { modeWithBaseMap = !modeWithBaseMap; showMapImage(modeWithBaseMap); } }); showMapImage(modeWithBaseMap); }
Example #2
Source File: InterpretationAdapter.java From dhis2-android-dashboard with BSD 3-Clause "New" or "Revised" License | 6 votes |
private IInterpretationViewHolder onCreateContentViewHolder(ViewGroup parent, int viewType) { switch (viewType) { case ITEM_WITH_IMAGE_TYPE: { View rootView = getLayoutInflater().inflate( R.layout.recycler_view_dashboard_item_imageview, parent, false); ImageView imageView = (ImageView) rootView.findViewById(R.id.dashboard_item_image); CheckableImageButton modeButton = (CheckableImageButton) rootView.findViewById(R.id.view_mode_button); return new ImageItemViewHolder(rootView,modeButton, imageView, mClickListener); } case ITEM_WITH_TABLE_TYPE: { TextView textView = (TextView) getLayoutInflater() .inflate(R.layout.recycler_view_dashboard_item_textview, parent, false); return new TextItemViewHolder(textView, mClickListener); } } return null; }
Example #3
Source File: InterpretationAdapter.java From dhis2-android-dashboard with BSD 3-Clause "New" or "Revised" License | 6 votes |
public ImageItemViewHolder(View rootView, CheckableImageButton modeButton, ImageView view, OnItemClickListener outerListener) { this.rootView = rootView; this.imageView = view; this.modeButton = modeButton; mImageLoader = PicassoProvider.getInstance(rootView.getContext(), false); listener = new OnInterpretationInternalClickListener(outerListener); imageView.setOnClickListener(listener); modeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { modeWithBaseMap = !modeWithBaseMap; showMapImage(modeWithBaseMap); } }); }
Example #4
Source File: DashboardItemAdapter.java From dhis2-android-dashboard with BSD 3-Clause "New" or "Revised" License | 6 votes |
public ImageItemViewHolder(View rootView, CheckableImageButton modeButton, ImageView view, OnItemClickListener outerListener) { this.rootView = rootView; this.imageView = view; this.modeButton = modeButton; mImageLoader = PicassoProvider.getInstance(rootView.getContext(), false); listener = new OnElementInternalClickListener(outerListener); imageView.setOnClickListener(listener); modeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { modeWithBaseMap = !modeWithBaseMap; showMapImage(modeWithBaseMap); } }); }
Example #5
Source File: DashboardItemAdapter.java From dhis2-android-dashboard with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * Depending on viewType, this method will return correct IElementContentViewHolder. * * * @param rootView * @param parent Parent ViewGroup. * @param viewType Type of view we want to get IElementContentViewHolder for. * @return view holder. */ private IElementContentViewHolder onCreateElementContentViewHolder( ViewGroup parent, int viewType) { switch (viewType) { case ITEM_WITH_IMAGE_TYPE: { View rootView = getLayoutInflater().inflate( R.layout.recycler_view_dashboard_item_imageview, parent, false); ImageView imageView = (ImageView) rootView.findViewById(R.id.dashboard_item_image); CheckableImageButton modeButton = (CheckableImageButton) rootView.findViewById(R.id.view_mode_button); return new ImageItemViewHolder(rootView,modeButton, imageView, mClickListener); } case ITEM_WITH_TABLE_TYPE: { TextView textView = (TextView) getLayoutInflater() .inflate(R.layout.recycler_view_dashboard_item_textview, parent, false); return new TextItemViewHolder(textView, mClickListener); } case ITEM_WITH_LIST_TYPE: { LinearLayout textViewContainer = (LinearLayout) getLayoutInflater() .inflate(R.layout.recycler_view_dashboard_item_list, parent, false); return new ListItemViewHolder(textViewContainer, mClickListener, mDashboardAccess); } } return null; }
Example #6
Source File: CardTextInputLayout.java From africastalking-android with MIT License | 4 votes |
public CheckableImageButton getPasswordToggleView() { return mPasswordToggleView; }
Example #7
Source File: PinTextInputLayout.java From africastalking-android with MIT License | 4 votes |
public CheckableImageButton getPasswordToggleView() { return mPasswordToggleView; }
Example #8
Source File: CardTextInputLayout.java From Luhn with MIT License | 4 votes |
public CheckableImageButton getPasswordToggleView() { return mPasswordToggleView; }
Example #9
Source File: PinTextInputLayout.java From Luhn with MIT License | 4 votes |
public CheckableImageButton getPasswordToggleView() { return mPasswordToggleView; }
Example #10
Source File: DesignDSL.java From anvil with MIT License | 4 votes |
public static BaseDSL.ViewClassResult checkableImageButton() { return BaseDSL.v(CheckableImageButton.class); }
Example #11
Source File: DesignDSL.java From anvil with MIT License | 4 votes |
public static Void checkableImageButton(Anvil.Renderable r) { return BaseDSL.v(CheckableImageButton.class, r); }