Note that there are some explanatory texts on larger screens.

plurals
  1. POAccessing a UI component (Button) inside several other UI components (ExpandableListView - GridView) in Android
    primarykey
    data
    text
    <p>In a xml, I am having <code>LinearLayout</code>. Inside that I am using an <code>ExpandableListView</code>. Every expand item contain just one view which is a <code>GridView</code>. A <code>GridView cell</code> compose with three UI components which are <code>ImageView</code>, <code>TextView</code> and a <code>Button</code>. How I have got control about those three UI components is as follow,</p> <pre><code>public View getView(final int position, View convertView, ViewGroup parent) { LayoutInflater layoutInflater = (LayoutInflater) imageAdapterContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); if (convertView == null) { convertView = layoutInflater.inflate(R.layout.single_grid_item, null); viewHolder = new ViewHolder(); viewHolder.singleImageView = (ImageView) convertView.findViewById(R.id.singleGridItem_imageView); viewHolder.singleTextView = (TextView) convertView.findViewById(R.id.singleGridItem_textView); viewHolder.singleDownloadButton = (Button) convertView.findViewById(R.id.singleGridItem_download_button); } } // ViewHolder is a static nested inner class </code></pre> <p>Things are working prety fine. That means each cell identify as different cells. They have different images, and appropriate <code>TextView</code> labels and also <code>Button</code> click event also working fine. For the button click I have used a downloading with a <code>ProgressDialog</code>. That also working fine. What I want is disable the <code>Button</code> when the downloading in progress. Downloading happening in a seperate <code>AsyncTask</code> class. Please tell me how can I disable the button which user has clicked for downloading.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload