[android-developers] CheckBox Bug
i was trying android N prev and found bug in "CheckBox" and " android.support.v7.widget.AppCompatCheckBox" not showing checkbox only text was showing . -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/a0458bd1-7d6e-446a-915a-c425c9445c82%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] checkbox
hi, how to bind checkbox data to button..give me an example..my app is like an onlilne store consists multiple checkboxes -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] checkbox
What? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Sun, Jul 22, 2012 at 3:37 AM, rajesh rajesh.vemu...@gmail.com wrote: hi, how to bind checkbox data to button..give me an example..my app is like an onlilne store consists multiple checkboxes -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] checkbox
http://www.mkyong.com/tutorials/android-tutorial/ On Mon, Jul 23, 2012 at 10:47 PM, Justin Anderson magouyaw...@gmail.comwrote: What? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Sun, Jul 22, 2012 at 3:37 AM, rajesh rajesh.vemu...@gmail.com wrote: hi, how to bind checkbox data to button..give me an example..my app is like an onlilne store consists multiple checkboxes -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Checkbox click fires OnlistItemclick in Custom listview android
HI, In my custom listview i have checkbox and 3 textviews, The problem is when i click on checkbox the onlistItem click is fired which i dont want, i want checkbox state to change when i click on checkbox and and when i click outside the checkbox i want the onlistItemclick to be fired.How to acheive this. I searched a lot but did not find any solution. -- Regards, Vani Reddy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] checkbox checked in listview
Hi vani, Uncheck the other checkboxes, its as simple as it is.. regards, Saran On Tue, Nov 8, 2011 at 4:56 PM, NaveenShrivastva kumarnaveen.si...@gmail.com wrote: http://android-codes-examples.blogspot.com/2011/03/listactivity-with-checkbox-using.html On Tue, Nov 8, 2011 at 4:47 PM, vani reddy vani.reddy.bl...@gmail.com wrote: Hi, I have created a custom listview of text and checkbox. When i click on a particular checkbox the other checkboxes in the rows also gets checked. How to avoid this?? -- Regards, Vani Reddy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] checkbox checked in listview
Vani, Each checkbox has to be a separate object, while it seems like you are adding the same checkbox to every list item. Daniel On 4 January 2012 12:41, saran vonteddu saran.myw...@gmail.com wrote: Hi vani, Uncheck the other checkboxes, its as simple as it is.. regards, Saran On Tue, Nov 8, 2011 at 4:56 PM, NaveenShrivastva kumarnaveen.si...@gmail.com wrote: http://android-codes-examples.blogspot.com/2011/03/listactivity-with-checkbox-using.html On Tue, Nov 8, 2011 at 4:47 PM, vani reddy vani.reddy.bl...@gmail.com wrote: Hi, I have created a custom listview of text and checkbox. When i click on a particular checkbox the other checkboxes in the rows also gets checked. How to avoid this?? -- Regards, Vani Reddy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] checkbox checked in listview
Hello Vani, You need to do the check and ucheck operation in onListItemClick. Check the below code which helps. @Override protected void onListItemClick(ListView l, View v, int position, long id) { // File newFile = (File) l.getItemAtPosition(position); CheckedTextView check = (CheckedTextView)v; check.setChecked(!check.isChecked()); super.onListItemClick(l, v, position, id); } Warm Regards, *Mukesh Kumar*, Android Consultant/Freelancer, India,Hyderabad. On Wed, Jan 4, 2012 at 6:13 PM, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: Vani, Each checkbox has to be a separate object, while it seems like you are adding the same checkbox to every list item. Daniel On 4 January 2012 12:41, saran vonteddu saran.myw...@gmail.com wrote: Hi vani, Uncheck the other checkboxes, its as simple as it is.. regards, Saran On Tue, Nov 8, 2011 at 4:56 PM, NaveenShrivastva kumarnaveen.si...@gmail.com wrote: http://android-codes-examples.blogspot.com/2011/03/listactivity-with-checkbox-using.html On Tue, Nov 8, 2011 at 4:47 PM, vani reddy vani.reddy.bl...@gmail.com wrote: Hi, I have created a custom listview of text and checkbox. When i click on a particular checkbox the other checkboxes in the rows also gets checked. How to avoid this?? -- Regards, Vani Reddy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Checkbox status in list view
My requriment is i have two listview activities 1st listview contain 2 textviews each row of listview 2nd one contain one textview one checkbox in each row of listview 1. I have to set the textview of 1st listview according to 2nd listview checked item also save checked item status after loading 2nd listview it shows previous checked item... plz can any one give me the solution for this..or any example code advance thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] checkbox checked in listview
Hi, I have created a custom listview of text and checkbox. When i click on a particular checkbox the other checkboxes in the rows also gets checked. How to avoid this?? -- Regards, Vani Reddy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] CheckBox Clear on Menu click
Dear All, I have problem on unchecking the checkbox when a menu is fired.? I am using a baseAdapter where i have a getView() method as such: --- public View getView(final int position, View view, ViewGroup parent) { final ViewHolder viewHolder; if (view == null) { viewHolder = new ViewHolder(); view = layoutInfalter.inflate(R.layout.inbox_row, null); viewHolder.checkBox = (CheckBox) view.findViewById(R.id.inboxCheckId); if (INBOX_VIEW_MODE == -1) { viewHolder.checkBox.setVisibility(View.GONE); } else { InboxEmailAdapter.setInboxViewMode(1); viewHolder.checkBox.setVisibility(View.VISIBLE); checkedItems = new ArrayListInteger(); viewHolder.checkBox.setOnCheckedChangeListener(new OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if(isChecked){ viewHolder.checkBox.setId(inboxEmailList.get(position).getId()); checkedItems.add(viewHolder.checkBox.getId()); } } }); } viewHolder.emailFrom = (TextView) view.findViewById(R.id.inboxFrom); viewHolder.emailSubject = (TextView) view.findViewById(R.id.inboxSubject); view.setTag(viewHolder); } else { viewHolder = (ViewHolder) view.getTag(); } viewHolder.emailFrom.setText(inboxEmailList.get(position).getFrom()); viewHolder.emailSubject.setText(inboxEmailList.get(position).getSubject()); return view; } --- On my activity: I have a listView populated with checkbox? I select checkbox, it is being selected. On my Menu i have cancel button which on click should uncheck the selected checkbox? I am not being able to perform this? Any helps would really help me -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] CheckBox Clear on Menu click
On Fri, Aug 26, 2011 at 2:46 AM, Robin Thapa ro...@focusone.com.np wrote: I have a listView populated with checkbox? I select checkbox, it is being selected. On my Menu i have cancel button which on click should uncheck the selected checkbox? I am not being able to perform this? Why don't you post the code for the part you're having problem with instead of the getView()? P.S. - That's not how you use a question mark? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] CheckBox Clear on Menu click
Sorry with my ?. Well i solved it. there were two options for me whether to change my getView() or use my the onBackPressed(); So i used the onBackPressed()?. Though this is a temporary. I will post the code. On Tue, Aug 30, 2011 at 5:17 AM, TreKing treking...@gmail.com wrote: On Fri, Aug 26, 2011 at 2:46 AM, Robin Thapa ro...@focusone.com.npwrote: I have a listView populated with checkbox? I select checkbox, it is being selected. On my Menu i have cancel button which on click should uncheck the selected checkbox? I am not being able to perform this? Why don't you post the code for the part you're having problem with instead of the getView()? P.S. - That's not how you use a question mark? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Robin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] checkbox in listview
Hello All I have checkbox in every row of listview. If click in a row then it dont make focus.Why? My ListView xml: -start-- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:fitsSystemWindows=true android:layout_weight=1 android:orientation=vertical RelativeLayout android:layout_width=fill_parent android:layout_height=wrap_content android:background=#b4b4b4 TextView android:id=@+id/txt android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=8pt android:layout_alignParentLeft=true android:textStyle=bold android:layout_centerVertical=true android:textColor=#00 android:text=Filter Group /TextView ImageView android:layout_alignParentRight=true android:src=@drawable/icon_filter android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=6dip android:scaleType=fitXY android:paddingBottom=4dip /ImageView /RelativeLayout ListView android:id=@+id/filtergroup_listview android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:paddingBottom=4dip android:paddingTop=4dip /ListView /LinearLayout end--- my row of ListView: -start- ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:fitsSystemWindows=true android:layout_weight=1 android:orientation=horizontal LinearLayout android:layout_width=fill_parent android:layout_height=fill_parent android:fitsSystemWindows=true android:layout_weight=1 android:orientation=horizontal android:layout_marginTop=7dip android:layout_marginBottom=7dip android:layout_marginLeft=5dip CheckBox android:text= android:id=@+id/CheckBox01 android:layout_width=fill_parent android:layout_height=wrap_content android:focusable=false / /LinearLayout /LinearLayout end--- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] checkbox in listview
Hi Goutom, * * In getView() method of your adapter class, you can find the check box element from your listview. implement the onClick() of your listview, and set the checkbox checked in listview's onClick method. that should work for you. On Mon, Aug 1, 2011 at 5:10 PM, Goutom goutom.sust@gmail.com wrote: Hello All I have checkbox in every row of listview. If click in a row then it dont make focus.Why? My ListView xml: -start-- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:fitsSystemWindows=true android:layout_weight=1 android:orientation=vertical RelativeLayout android:layout_width=fill_parent android:layout_height=wrap_content android:background=#b4b4b4 TextView android:id=@+id/txt android:layout_width=wrap_content android:layout_height=wrap_content android:textSize=8pt android:layout_alignParentLeft=true android:textStyle=bold android:layout_centerVertical=true android:textColor=#00 android:text=Filter Group /TextView ImageView android:layout_alignParentRight=true android:src=@drawable/icon_filter android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=6dip android:scaleType=fitXY android:paddingBottom=4dip /ImageView /RelativeLayout ListView android:id=@+id/filtergroup_listview android:layout_width=fill_parent android:layout_height=fill_parent android:layout_weight=1 android:paddingBottom=4dip android:paddingTop=4dip /ListView /LinearLayout end--- my row of ListView: -start- ?xml version=1.0 encoding=UTF-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:fitsSystemWindows=true android:layout_weight=1 android:orientation=horizontal LinearLayout android:layout_width=fill_parent android:layout_height=fill_parent android:fitsSystemWindows=true android:layout_weight=1 android:orientation=horizontal android:layout_marginTop=7dip android:layout_marginBottom=7dip android:layout_marginLeft=5dip CheckBox android:text= android:id=@+id/CheckBox01 android:layout_width=fill_parent android:layout_height=wrap_content android:focusable=false / /LinearLayout /LinearLayout end--- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- *Regards, Viral* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Checkbox bug?
Whilst building a layout I think I've found a bugin a relative layout: CheckBox android:text=File-name android:layout_width=fill_parent android:layout_height=wrap_content android:layout_gravity=left android:id=@+id/chkUse android:textColor=@color/yellow android:textStyle=bold / Works find, with the text aligned to the left of the checkbox, however if I add a background colour to the checkbox, the text overlays the checkbox: CheckBox android:text=File-name android:layout_width=fill_parent android:layout_height=wrap_content android:layout_gravity=left android:id=@+id/chkUse android:background=@color/blue android:textColor=@color/yellow android:textStyle=bold / -- Regards, Sy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] CheckBox text behind box in GridView
Hi everyone, I'm pretty new to Android, and I'm looking for a little help. I have a GridView with the following XML in a linear layout. GridView android:id=@+id/gridview android:layout_height=wrap_content android:layout_width=fill_parent android:numColumns=2 android:columnWidth=90dp android:stretchMode=columnWidth I'm adding a series of CheckBoxes to the view with... public View getView(int position, View convertView, ViewGroup parent) { CheckBox checkView; if (convertView == null) { checkView = new CheckBox(context); checkView.setPadding(5, 5, 5, 5); } else { checkView = (CheckBox) convertView; } checkView.setText(checkNames[position]); checkView.setWidth(400); return imageView; } No matter how many different widths I try, including fill_parent and wrap_content, the text winds up behind the box instead of next to it. Any hints or tricks? Thanks, Andrew -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Checkbox problem
I have a big Problem with my Listview and its Checkboxes... Every thing is shown and works fine, until I click on one of the Checkboxes. Then other Boxes are checked and sometimes even without checking the one, I clicked. I searched the web, but didn't find a solution that is working. Now I'm hoping, someone of you, Guys, would be able to help to solve my problem. Enclosed is the Code of my Customadapter, which is used for filling the list. package org.openintents.filemanager; import java.util.ArrayList; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.View.OnClickListener; import android.widget.BaseAdapter; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.TextView; import android.widget.CompoundButton.OnCheckedChangeListener; public class CustomSettingsAdapter extends BaseAdapter{ private static ArrayListSettingItem settingsArrayList; private LayoutInflater mInflater; public CustomSettingsAdapter(Context context, ArrayListSettingItem sitems) { settingsArrayList = sitems; mInflater = LayoutInflater.from(context); } public int getCount() { return settingsArrayList.size(); } public Object getItem(int position) { return settingsArrayList.get(position); } public ArrayListSettingItem getItemList() { return settingsArrayList; } public long getItemId(int position) { return position; } public View getView(final int position, View convertView, ViewGroup parent) { final ViewHolder holder; if (convertView == null) { convertView = mInflater.inflate(R.layout.settings_item, null); holder = new ViewHolder(); holder.txtName = (TextView) convertView.findViewById(R.id.setting_name); holder.details = (TextView) convertView.findViewById(R.id.setting_detail); holder.cb = (CheckBox) convertView.findViewById(R.id.check); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } holder.txtName.setText(settingsArrayList.get(position).getName()); holder.details.setText(settingsArrayList.get(position).getPath()); holder.cb.setChecked(settingsArrayList.get(position).getState()); int[]tags = new int[2]; tags[0]= position; tags[1]= 0; holder.cb.setTag(tags); holder.cb.setOnCheckedChangeListener(new OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { int[]i=(int[])holder.cb.getTag(); settingsArrayList.get(i[0]).setState(isChecked); notifyDataSetChanged(); } }); return convertView; } static class ViewHolder { TextView txtName; TextView details; CheckBox cb; } } Thank you very much in advance for helping. Best regards Tobi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] CheckBox spacing
I have a need to put a row (or column) of 9 checkboxes in a dialog. Each checkbox will only have a 1 character description (0-9) The problem is that the default CheckBox leaves HUGE amounts of space around it, which makes it impossible to fit 9 in the dialog. Is there any way to reduce the space a Checkbox uses? Or do I have to write a custom widget to do this simple task? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] CheckBox problem
hi all, i have custom ArrayAdapter to make listView each row contain ( image text checkBox ) i made the xml file to make the standard layout for row and make the default visibility for checkBox false in getView function that draw the listview get the checkBox using id and assign specific tag for it to enable me to get it on the onListItemClick function i made this code : CheckBox check = (CheckBox)v.findViewWithTag(position); check.setVisibility(0); to get the current checkbox and make it visible but when i choose specific row i found that some of the other rows checkbox become visible and current row checkbox not change ?? what is the problem ??? how can isolve it thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] CheckBox problem
On Wed, Oct 13, 2010 at 5:52 AM, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote: what is the problem ??? ListView recycles views so the one you're setting the check state on may be re-used and re-drawn somewhere else. Don't use findViewWithTag() - set the checked state in getView(). - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Checkbox are not getting selected
Hi, I want to display list of items in my application and user will select checkbox which is present in front of each item. List is displayed well. It also shows checkbox infront of list item but when I click on checkBox it is not getting selected. My code is like this public void onCreate(Bundle icicle) { super.onCreate(icicle); String[] names = new String[] { 123, 234, 345, 456, 567, 678, 789, 980}; this.setListAdapter(new ArrayAdapterString(this,android.R.layout.simple_list_item_multiple_choice, names)); } @Override protected void onListItemClick(ListView lv, View v, int pos, long id) { super.onListItemClick(lv, v, pos, id); Object obj = this.getListAdapter().getItem(pos); String keyword = obj.toString(); Toast.makeText(this, User selected: + keyword, Toast.LENGTH_LONG) .show(); } what's wrong in this code? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Checkbox with multiple lines with different font size
I am trying to put CheckBox with multiple lines and all lines after fist with smaller font size same as we have under from home page Menu-Settings-Sound Display-Silent mode. It shows text Silent mode on first line and then some more text (kind of help/current settings) for this option and still CheckBox itself is aligned in the center of all the lines (may be on left or right side). Is that can be done by only one control/widget or group of many controls/widgets? I can only think of by using table but it is complex. I tried android:contentDescription but it did not work. Looks like it is for accessibility. Any help will be appreciated. Thanks, JP -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Checkbox with multiple lines with different font size
On Fri, Oct 8, 2010 at 10:05 AM, scadaguru scadag...@gmail.com wrote: I am trying to put CheckBox with multiple lines and all lines after fist with smaller font size same as we have under from home page Menu-Settings-Sound Display-Silent mode. What you're looking at is a preference. You can achieve the same effect by using a CheckBoxPreference yourself. If a preference is not what you want, you can create a simple layout that has two text views and a check box setup the way you want. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] checkbox in listview
Hi All, I have put checkbox in listview and displaying on the screen. can anyone tell me how to get checkbox even when user click on checkbox of listview. Thanks in advance. . -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] checkbox in listview
On Wed, Jul 14, 2010 at 2:56 AM, Narendra Bagade bagadenaren...@gmail.comwrote: I have put checkbox in listview and displaying on the screen. OK can anyone tell me how to get checkbox even when user click on checkboxof listview. This makes no sense. Please clarify. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] CheckBox in ListView
dear developers ; i am developping an Android application for the management of the contact list. but i am having a problem : the list contain for every contact a checkbox to chose which one to modify for example, the problem is that when the list became longer than the phone screen and the scrolling is active; when i select a check box , a second one is automatically selected in the bottom of the list for example , but his action is not performed. the problem is the automatic selection of the second checkbox; please what s the reason for a such problem. how can i fix it ?? Best Regards -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] checkbox preference
Hello everybody, I would like to override the checkbox preference so that: - the key and title are right aligned - the checkbox icon is on the left side I think I have to modify the checkboxpreference.java, do you know how? Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe from this group, send email to android-developers+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[android-developers] checkbox and icons in listview
Hi, I am looking to create a custom ListView with 6 fixed items in the list. Each list row comprising of the checkbox, image icon and a single line of text. I have read couple of tutorials but none of them seem to be that well explanatory. Could someone please guide me to a sample code? That would be great help. Thanks, Abhishek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] checkbox and icons in listview
Hey I just wrote something like this I couldn't find any examples either but I can give you some pointers. Declare your List View Layout ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical ImageView android:src=@drawable/groshielogo android:layout_width=wrap_content android:layout_height=wrap_content android:paddingBottom=20px android:paddingTop=20px android:layout_gravity=center / ListView android:id=@+id/lvItems android:layout_width=fill_parent android:layout_height=wrap_content android:choiceMode=singleChoice android:focusable=true android:clickable=true android:longClickable=true /ListView /LinearLayout Declare another layout file for the specific rows.in my cae I have a checkbx and two textvies but it should be obvious how to change it just add or remove fields. TableLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent TableRow android:layout_width=fill_parent android:layout_height=wrap_content CheckBox android:layout_width=wrap_content android:layout_height=wrap_content android:id=@+id/rowItemBought android:paddingRight=10px / TextView android:layout_width=fill_parent android:layout_height=wrap_content android:id=@+id/rowItemName android:paddingRight=10px / TextView android:layout_width=fill_parent android:layout_height=wrap_content android:id=@+id/rowItemPrice android:paddingRight=10px / /TableRow /TableLayout Then if you are trying to get the information out of a custom class say in my case the shopping list class you need to create a custom Array Adapter that will utilize this layout at the bottom you see where I assign the different fields like the 2 textviews and the checkbox to a particular field in the class. package unf.edu.esifall09.team1; import java.util.List; import unf.edu.esifall09.team1.R; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.CheckBox; import android.widget.LinearLayout; import android.widget.TextView; public class ShoppingListAdapter extends ArrayAdapterShoppingListItems { int resource; public ShoppingListAdapter(Context context, int resource, ListShoppingListItems items) { super(context, resource,items); this.resource=resource; } @Override public View getView(int position, View convertView, ViewGroup parent) { LinearLayout shoppingListItemView; ShoppingListItems sli =getItem(position); String prodName =sli.getItemDescription(); double price = sli.getPrice(); boolean purchases = sli.isPurchased(); if(convertView==null) { shoppingListItemView = new LinearLayout(getContext()); String inflater = Context.LAYOUT_INFLATER_SERVICE; LayoutInflater vi; vi = (LayoutInflater)getContext().getSystemService(inflater); vi.inflate(resource, shoppingListItemView, true); } else { shoppingListItemView = (LinearLayout) convertView; } CheckBox chkPurchased = (CheckBox)shoppingListItemView.findViewById(R.id.rowItemBought); TextView itemName =(TextView)shoppingListItemView.findViewById(R.id.rowItemName); TextView itemPrice =(TextView)shoppingListItemView.findViewById(R.id.rowItemPrice); chkPurchased.setChecked(purchases); itemName.setText(prodName); itemPrice.setText(Double.toString(price)); return shoppingListItemView; } } Ofter that is created go to the activity where you will like your ListView Declare your Variables ArrayListShoppingListItems items; ShoppingListAdapter adapter; ListView lv; Then on create set up your list view and your adapters public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); lv=(ListView)findViewById(R.id.lvItems); items= new ArrayListShoppingListItems(); do a loop of some sort to fill in your adapter. Like in my case I read form a Database Cursor itemsCur=productsDb.getAllShoppingListItemsCursor(shoppingListPK); do{ ShoppingListItems sli = new ShoppingListItems(); sli.setItemDescription(itemsCur.getString(2)); sli.setPrice(itemsCur.getDouble(4)); sli.setPurchased((itemsCur.getInt(7))==0?false:true); sli.setQuantity(itemsCur.getDouble(5)); sli.setShoppingListItemPK(itemsCur.getInt(0)); sli.setShoppingListPK(itemsCur.getInt(1)); sli.setStorePK(itemsCur.getInt(6)); sli.setUpc(itemsCur.getString(3)); items.add(sli); }while(itemsCur.moveToNext()); Set the data into your adapter and add to the List View adapter= new ShoppingListAdapter(this, R.layout.shippinglistitem, items); lv.setAdapter(adapter); } That should do it Hopefully it makes sense! Sincerely Jose C Gomez http://www.josecgomez.com On Mon, Dec 14, 2009 at 8:09 PM, Abhi abhishek.r.sha...@gmail.com wrote: Hi, I am looking to create a custom ListView with 6 fixed items in the list. Each list row
[android-developers] Checkbox in Context Menu
Hi guys, I have a ListView with 5 items. Each of the items can be long pressed to open a Context Menu. The Menu has 5 options and I want them to be selectable, by having a check box. I know of the multiple choice listview but was not sure how to have this checkbox feature in a ContextMenu. Does anyone know if this is possible and if so, how? Thanks, Abhi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Checkbox in Context Menu
I have a ListView with 5 items. Each of the items can be long pressed to open a Context Menu. The Menu has 5 options and I want them to be selectable, by having a check box. I know of the multiple choice listview but was not sure how to have this checkbox feature in a ContextMenu. Does anyone know if this is possible and if so, how? Try setCheckable(true) on the MenuItem. I haven't tried this, but it's in the API... -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] CheckBox blocks ExpandableListView.OnGroupClickListener
I'm trying to put a checkbox into ExpandableListView. I noticed that doing that disables basic functionality of displaying child list when group row is clicked. Furthermore when I click outside of checkbox the click is detected by nether checkbox nor by OnGroupClickListener. Can someone help me to resolve this? The CheckBox works fine though including detecting clicks when clicking directly on the box -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] CheckBox test= (CheckBox) findViewById(R.id.test); returns null
Hi Android Experts, why CheckBox is always null. please find the error in my code: xml- CheckBox id=@+id/checkbox android:layout_width=wrap_content android:layout_height=wrap_content / code file- package com.reblogr.reblogrclient; public class Test extends Activity { /** Called when the activity is first created. */ public CheckBox checkbox; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.login); Button connectButton = (Button)findViewById(R.id.objBtn1); checkbox= (CheckBox)findViewById(R.id.checkbox); connectButton.setOnClickListener(connectButtonListener); } public OnClickListener connectButtonListener = new OnClickListener () { public void onClick(View v) { Athenticate(); } }; public void Athenticate(){ if(checkbox.isChecked()){ // NullPointerException here //do something } } } why checkbox is null? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Checkbox align label
Here is an easy question but I can't find the easy answer. How can I align the label in a Checkbox widget to the left of the actual checkbox. To label first then checkbox. It seems to default to checkbox first then label. thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---