Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6890953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:20:51+00:00 2026-05-27T06:20:51+00:00

In My Application i have View like this image: Now, I want to make

  • 0

In My Application i have View like this image:

enter image description here

Now, I want to make such coading that, the one bottle should be selected.
if i select another bottle then that bottle should be selected and another bottle should be deselected.
It should be happend for all the bottle.

I know that i can make it using the RadioGroup and RadioButton for Bottle.

but instead of that is there any other way to make it possible ?
If Yes, then please give me that technique.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:20:52+00:00Added an answer on May 27, 2026 at 6:20 am

    Here is a nice example (an inspiration):
    http://vikaskanani.wordpress.com/2011/07/20/android-custom-image-gallery-with-checkbox-in-grid-to-select-multiple/

    onCreate(){
    GridView imagegrid = (GridView) findViewById(R.id.phoneimagegrid);
            imageAdapter = new ImageAdapter(this);
            imagegrid.setAdapter(imageAdapter);
            imagegrid.setOnItemClickListener(new OnItemClickListener() {
                public void onItemClick(AdapterView<?> parent, View v,
                        int position, long id) {
                    Toast.makeText(AndroidCustomGalleryActivity.this,
                            "" + position, Toast.LENGTH_SHORT).show();
                }
            });
    }
    
    public class ImageAdapter extends BaseAdapter {
    ...
    public View getView(int position, View convertView, ViewGroup parent) {
                ImageView imageView;
                if (convertView == null) { // if it's not recycled, initialize some
                                            // attributes
                    imageView = new ImageView(mContext);
                    imageView.setLayoutParams(new GridView.LayoutParams(120, 120));
                    imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
                    imageView.setPadding(30, 8, 30, 8);
                } else {
                    imageView = (ImageView) convertView;
                }
    
                imageView.setImageResource(mThumbIds[position]);
                return imageView;
            }
    
            // references to our images
            private Integer[] mThumbIds = { R.drawable.icon, R.drawable.icon,
                    R.drawable.icon, R.drawable.icon, R.drawable.icon,
                    R.drawable.icon, R.drawable.icon, R.drawable.icon };
        }
    

    Layout:

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >
    
        <GridView
            android:id="@+id/phoneimagegrid"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:columnWidth="120dp"
            android:gravity="center"
            android:horizontalSpacing="10dp"
            android:numColumns="auto_fit"
            android:stretchMode="columnWidth"
            android:verticalSpacing="10dp" />
    
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a view like this in my Flex mobile Application: <s:View xmlns:fx=http://ns.adobe.com/mxml/2009 xmlns:s=library://ns.adobe.com/flex/spark
I have a mvc2 application with a view like this <% using (Ajax.BeginForm(UserApprove, new
I would like to have a custom view in my application that consists of
In my application,i have text view with long text. i need text wrapping like
In my WPF application I have a View that is given a ViewModel, and
In my Backbone application I have a main view that shows previews of posts.
I have a table view, and I have image file in my application folder
This is a Rails 3 application. I have images that can be tied to
I have implement one application in which four image button and on image button
In my CakePHP application, I have a view with this markup: <div class=copy id=share-copy></div>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.