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

  • Home
  • SEARCH
  • 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 8218533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:49:39+00:00 2026-06-07T12:49:39+00:00

transferAvailPowered.axml <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=horizontal android:layout_width=fill_parent android:layout_height=wrap_content android:focusable=false android:layout_margin=5dp android:padding=5dp android:gravity=left> <TextView

  • 0

transferAvailPowered.axml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:layout_margin="5dp"
android:padding="5dp"
android:gravity="left">
<TextView
    android:id="@+id/availSerial"
    android:layout_width="0dp"
    android:layout_weight=".30"
    android:layout_height="wrap_content"
    android:layout_marginLeft="45dp"
    android:layout_marginRight="5dp"
    android:layout_marginTop="5dp"
    android:layout_marginBottom="5dp"
    android:focusable="false"
    android:padding="5dp"
    android:gravity="left" />
<TextView
    android:id="@+id/availModel"
    android:layout_width="0dp"
    android:layout_weight=".30"
    android:layout_height="wrap_content"
    android:layout_margin="5dp"
    android:focusable="false"
    android:padding="5dp"
    android:gravity="left" />
<AutoCompleteTextView
    android:id="@+id/availSite"
    android:layout_width="120dp"
    android:layout_height="wrap_content"
    android:padding="5dp"
    android:hint="To Site"
    android:background="@android:color/white"
    android:textColor="@android:color/black"
    android:textCursorDrawable="@null"
    android:focusable="false"
    android:layout_margin="5dp"
    android:gravity="left" />
<ImageButton
    android:id="@+id/addToTransfer"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="5dp"
    android:layout_margin="5dp"
    android:background="@drawable/addsmall"
    android:focusable="false"
    android:gravity="left" />

transferAvailAttached.axml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:layout_margin="5dp"
android:padding="5dp">
<TextView
    android:id="@+id/availSerial"
    android:layout_width="0dp"
    android:layout_weight=".30"
    android:focusable="false"
    android:layout_height="wrap_content"
    android:layout_margin="5dp"
    android:padding="5dp"
    android:gravity="right" />
<TextView
    android:id="@+id/availModel"
    android:layout_width="0dp"
    android:layout_weight=".30"
    android:layout_height="wrap_content"
    android:focusable="false"
    android:layout_margin="5dp"
    android:padding="5dp"
    android:gravity="center" />
<CheckBox
    android:id="@+id/include"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="left|center_vertical"
    android:focusable="false"
    android:layout_marginRight="30dp"
    android:background="@drawable/bg_checkbox" />
<ImageButton
    android:id="@+id/removeAttachment"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:focusable="false"
    android:padding="5dp"
    android:layout_margin="5dp"
    android:background="@drawable/deletesmall"
    android:gravity="right" />

Adapter

class EquipAdapter : BaseExpandableListAdapter
{
    private List<CPEquipment> Parent { get; set; }
    private List<List<CPEquipment>> Child { get; set; }
    private Context _context { get; set; }
    private IListAdapter _adapter { get; set; }
    private ExpandableListView _list { get; set; }

    public EquipAdapter(Context context, List<CPEquipment> parent, List<List<CPEquipment>> child, IListAdapter adapter, ExpandableListView list)
    {
        _context = context;
        Parent = parent;
        Child = child;
        _adapter = adapter;
        _list = list;
    }

    public override Java.Lang.Object GetChild(int groupPosition, int childPosition)
    {
        List<CPEquipment> level1 = Child.ElementAt(groupPosition);
        CPEquipment level2 = level1.ElementAt(childPosition);
        E e = new E() {Serial = level2.Serial, Model = level2.Model};
        return e;
    }

    public override long GetChildId(int groupPosition, int childPosition)
    {
        return Convert.ToInt32(groupPosition.ToString(CultureInfo.InvariantCulture) + childPosition.ToString(CultureInfo.InvariantCulture));
    }

    public override int GetChildrenCount(int groupPosition)
    {
        return Child.ElementAt(groupPosition).Count;
    }

    public override View GetChildView(int groupPosition, int childPosition, bool isLastChild, View convertView, ViewGroup parent)
    {
        if (convertView == null)
        {
            LayoutInflater inflater = (LayoutInflater)_context.GetSystemService(Context.LayoutInflaterService);
            convertView = inflater.Inflate(Resource.Layout.transferAvailAttached, null);
        }

        E e = (E)GetChild(groupPosition, childPosition);
        TextView serial = (TextView)convertView.FindViewById(Resource.Id.availSerial);
        serial.Text = e.Serial;
        TextView model = (TextView)convertView.FindViewById(Resource.Id.availModel);
        model.Text = e.Model;          

        return convertView;
    }

    public override Object GetGroup(int groupPosition)
    {
        CPEquipment c = Parent.ElementAt(groupPosition);
        E e = new E(){Serial = c.Serial, Model = c.Model, Type = c.Status}; 

        return e;
    }

    public override long GetGroupId(int groupPosition)
    {
        return groupPosition;
    }

    public override View GetGroupView(int groupPosition, bool isExpanded, View convertView, ViewGroup parent)
    {
        E e = (E)GetGroup(groupPosition);

        if (convertView == null)
        {
            LayoutInflater inflater = (LayoutInflater)_context.GetSystemService(Context.LayoutInflaterService);
                convertView = inflater.Inflate(Resource.Layout.transferAvailPowered, null);
     }

        TextView serial = (TextView)convertView.FindViewById(Resource.Id.availSerial);
        serial.Text = e.Serial;
        TextView model = (TextView)convertView.FindViewById(Resource.Id.availModel);
        model.Text = e.Model;
        AutoCompleteTextView acText = (AutoCompleteTextView)convertView.FindViewById(Resource.Id.availSite);
        acText.Adapter = _adapter;

        _list.ExpandGroup(groupPosition);

        return convertView;
    }

    public override bool IsChildSelectable(int groupPosition, int childPosition)
    {
        return true;
    }

    public override int GroupCount
    {
        get { return Parent.Count; }
    }

    public override bool HasStableIds
    {
        get { return true; }
    }

}

Outcome:

enter image description here

In this scenario, the AutoCompleteTextView in the parent group and the green plus button should be “selectable” so that the user can input the info into the field and click that button without collapsing the group. And the CheckBox and the red x button in the child should also be “selectable” so the user can check the CheckBox and click the button. The only part of that that actually works is that the CheckBox is selectable and the group doesn’t collapse because for lack of a better term, the group layout is “dead” and does nothing when pressed. And the seemingly “working” CheckBox isn’t even so because it does this weird thing where checking or unchecking one will randomly check or uncheck others.

  • 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-06-07T12:49:41+00:00Added an answer on June 7, 2026 at 12:49 pm

    Below code is to resolve checkbox problem “CheckBox isn’t even so because it does this weird thing where checking or unchecking one will randomly check or uncheck others.” Along with ImageButton and CheckBox handling.

    public override View GetChildView(final int groupPosition, int childPosition, bool isLastChild, View convertView, ViewGroup parent)
    {
        LayoutInflater inflater = (LayoutInflater)_context.GetSystemService(Context.LayoutInflaterService);
        convertView = inflater.Inflate(Resource.Layout.transferAvailAttached, null);
    
        E e = (E)GetChild(groupPosition, childPosition);
        TextView serial = (TextView)convertView.FindViewById(Resource.Id.availSerial);
        serial.Text = e.Serial;
        TextView model = (TextView)convertView.FindViewById(Resource.Id.availModel);
        model.Text = e.Model;     
    
        CheckBox include = (CheckBox)convertView.FindViewById(Resource.Id.include); 
    
        include.setOnCheckedChangeListener(new OnCheckedChangeListener() {
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                // TODO Auto-generated method stub
                //DO your checkbox handling here
            }
        });
    
        ImageButton removeAttachment =(CheckBox)convertView.FindViewById(Resource.Id. removeAttachment);  
    
        removeAttachment.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                // TODO Auto-generated method stub
                //DO your imageButton handling here
            }
        });
    
        return convertView;
    }
    
    public override View GetGroupView(final int groupPosition, bool isExpanded, View convertview, ViewGroup parent)
    {
        View convertView = convertview;
        if (convertView == null) 
        {
            E e = (E)GetGroup(groupPosition);
    
            LayoutInflater inflater = (LayoutInflater)_context.GetSystemService(Context.LayoutInflaterService);
            convertView = inflater.Inflate(Resource.Layout.transferAvailPowered, null);
        }
    
        TextView serial = (TextView)convertView.FindViewById(Resource.Id.availSerial);
        serial.Text = e.Serial;
        TextView model = (TextView)convertView.FindViewById(Resource.Id.availModel);
        model.Text = e.Model;
        AutoCompleteTextView acText = (AutoCompleteTextView)convertView.FindViewById(Resource.Id.availSite);
        acText.Adapter = _adapter;
    
        ImageButton addToTransfer =(CheckBox)convertView.FindViewById(Resource.Id. addToTransfer);  
    
        addToTransfer.setOnClickListener(new OnClickListener() {                        
            public void onClick(View v) {
                // TODO Auto-generated method stub
    
                //DO your addToTransfer imageButton handling here
    
            }
        });
    
        _list.ExpandGroup(groupPosition);
    
        return convertView;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.