Android :: ExpandableListView - Is Conditional Expansion Possible
Aug 12, 2010
I have an ExpandableListView bound to a SQLite database. To simplify things, lets assume the database contains two columns: title and body. In the ExpandableListView, there is a group for each title, and a childfor each corresponding body.
Now to make things more interesting, some of the rows in the SQLite database do not have a body (that is... they only have a title). As you can see, if there is no body, then there is no reason to expand the group... because the child will be empty (i.e. String body == "").
I'm searching for a way to catch a situation like this, and skip the group's expansion. I don't want a blank child to be expanded. To put it in psuedo code, I want something like this:
CODE:...............
View 1 Replies
Aug 16, 2010
For a better handling and overview in expandableLists I would like to show only the childelements of the last selected group - the previously expanded group should be automaticly collapsed. The groupheader of the expanded group should be als aligned to the top of the screen to show the user that he's in the right group and that he can start to read the group childs from the beginning.
This worked well with the following code until now (android 1.5 - 2.1) but with android 2.2 the selection seems to work after the collapse method call:
CODE:..............
If a group is selected by touch and expanded it should collapse the previously expanded group (if one exists). To align the groupheader to the top of the screen the method "setSelectedGroup(groupPosition)" is called.
Without collapsing a group (e.g. if you close the group manually before you open another) the selection is done correctly, otherwise the list entries of the expanded group are shown somewhere in the middle and not at the top as expected. Has someone a solution or workaround for this issue? The new API method smoothScrollToPosition (API level 8) is also not working in this case.
I mentioned this issue also here: http://code.google.com/p/android/issues/detail?id=9177
View 2 Replies
View Related
Nov 27, 2009
Can any one tell the expansion of API?...
View 2 Replies
View Related
Mar 30, 2010
How to do conditional compilation in JAVA.
something like in C, C++ :
#ifdef TRUE_CONDITION
#else
#endif
View 14 Replies
View Related
Feb 2, 2009
I would like to mute my application's music when the user is listening to mp3 with the OS music player. I'm using 2 channels in my app so I can't use AudioManager.isMusicActive().
View 2 Replies
View Related
Mar 19, 2010
I want to make an activity that allows orientation changes on some condition, but not otherwise. More exactly I want to prevent restarting the activity when a background thread is busy.
I have put the configChanges attribute on the activity manifest, and onConfigurationChanged is called when the orientation changes. However I want to allow the app to change the orientation when allowed.
CODE:...................
View 1 Replies
View Related
Feb 15, 2010
I have been waiting for the expansion of google market and to my shock I see that there is almost no activity on the same for the past couple of months. We just keep hearing that expansion will happen, but absolutely no news on the same. Does someone out there have any updates, and can comeone from google reply for this query that we have been asking a million time, just once.
View 2 Replies
View Related
Apr 16, 2010
Iam facing problem regarding automatic expansion of list view..1) i had separate xml file for each list item . i.e inflated in efficient adaptor, list element is also using selector or highlightor file for background change on click.
Now in my main xml file view is like this
-LINEAR LAYOUT - VERTICAL (MAIN)
- LINEAR LAYOUT -HORIZONTAL HAVING5 BUTTONS .(CHILD 1)
- LINEAR LAYOUT - horizontal having two views as list view.
Problem i am facing here is second child having two listview .. only one listview is visible and it is expanding itself to width as fill parent.
1)I had tried to chnage the list item size ..
2)Secondly i tried to customize the listview size parameters in main xml ,but it is cutting the list view i.e. showing half data.
View 1 Replies
View Related
Jul 13, 2010
I just have a question on that new Seidio 3500mAh battery. Is that the only expanded battery that is currently on the market, or are there other ones that are bigger that do not require a modified back plate. I was just wondering if there are others that are in the works that may be a better alternative.
Also, i was reading that the new Droid X has stellar battery performance for a strikingly similar phone from some reviews on the web, and its battery is rated at 1540mAh. I saw a picture of the battery itself, and was wondering if any of you know whether it would fit in the EVO or not. I don't care much for the Droid X, but if its battery would fit the EVO, maybe that could help the cause.
View 4 Replies
View Related
May 25, 2010
Getting my EVO tomorrow, bought from Google I/O attendee. Not 100% sure I am going to ditch my Sprint Touch Pro 2. I think I will activate the EVO using the Google I/O free month of service and use conditional forwarding on my Sprint TP2 subscribed number and direct it to the EVO. That way I can keep the TP2 off, or with the phone radio off at least, and get calls routed to the EVO for free with no/very little delay. That way I can test the EVO without switching service from my TP2, and not give out the temp EVO phone number, and not rack up charges on my existing subscription with Sprint.
To enable conditional call forwarding:
*28 + number + send
To disable conditional call forwarding:
*38 + send
I think this will work without charging me airtime to my TP2 account, as opposed to standard call forwarding (*72) which is quite costly.
View 13 Replies
View Related
Aug 14, 2009
The bundled sample video (Hero_Sample_Video.mp4) is playing nice and smooth. However, when I try to encode a file in the same format with ffmpeg, I get jerky playback. Videos seem to play slower, then quicker, then slower, etc. I'm encoding with the same settings as the sample clip, i.e. H.264, 480x320 and 48 kHz Stereo AAC audio. I have tried low and high bitrates, different quantizers and even two different containers: MP4 and M4V. I fail to obtain smooth playback even with the H.264 settings from https://help.ubuntu.com/community/AndroidVideoEncoding aimed at Android phones. Smooth video playback is obviously possible on this phone, since the 30 FPS full screen sample clip plays back without a hitch, so what are the secret flags I need to pass ffmpeg to attain this holy grail?
View 4 Replies
View Related
Jun 30, 2010
What is the max size microsd card that can be used? The .pdf user manual states microsd 2.0 compatible but does not mention size. I�m also not sure whether the microsd 2.0 standard includes microsdhc.
View 1 Replies
View Related
Apr 19, 2010
1. Is it a 16GB or 32GB expansion slot?
2. If 16GB
a - Will it accept a 32GB Card - just only show 16GB?
b - Is it possible that a firmware upgrade would allow for a 32GB Card?
What i'm getting at is, can i buy a 32GB Card and expect the Incredible to accept it in hopes that A. It allows for 32GB or B. Future firmware will make it available?
View 9 Replies
View Related
Nov 19, 2009
Sprint has reportedly stopped charging $0.20 per min for call forwarding (Conditional only). See here:
Google Voice & Sprint... 11/08/09 Inside Sprint Now. I've read tons of forums, discussions, web sites, and there's a lot of conflicting information and some Sprint reps are getting confused on this, it's new.
However, here's my general understanding:.................
View 3 Replies
View Related
Oct 27, 2010
I need to implement an xml parser and the parsed result into an expandablelistview.
View 1 Replies
View Related
Jul 29, 2009
I have an expandable list view with a static array for the group data and an SQLite database for the child data. It is implemented with the BaseExpandableListAdapter and works great, except, when I edit the database to delete or add children to the list I do not see the changes onscreen. It looks like I can use the registerDataSetObserver method to notify the adapter and expandable list of a data change. What I have to do in the callback to make Android redraw the list after data changes is what I need to know. Can I do it? Documentation on this part of the SDK is a bit sparse and expandable list view example code is not a good match. Can anyone offer advice on how to use a DataSetObserver? It feels like I have to switch over to a Cursor type adapter.
View 2 Replies
View Related
Dec 15, 2009
This is my ExpandableListView
CODE:..............
When I execute this in emulator, green(childDivider color) is all over the place.
It seems if childDivider is ColorDrawable, it has no bound.
View 2 Replies
View Related
Mar 18, 2010
I have an ExpandableListView with several groups and each group contains several children. I want to make this list searchable, just like a regular list view. I have a SimpleCursorTreeAdapter (mAdapter) for this expandlable list.
I tried to use the built in list filter using:
CODE:.......
The above code does not work for filtering.
How can I implement the search/filter functionality?
View 2 Replies
View Related
Sep 17, 2010
Is it possible to animate the expanding and collapsing of the groups in a ExpandableListView.
View 3 Replies
View Related
Jun 17, 2009
I need a solution how to get the OnChildClick working for my ExpanableListActivity.
when starting of this project the Listener was working, but now i get nothing out of it?
i tried setting the listener through: "getExpandableListView().setOnChildClickListener(this);" at several point, but it isn't responding.
Here's the source code:
CODE:............
View 3 Replies
View Related
Jul 18, 2010
I want to inflate a childView of ExpandableChildView component.
Code:.............
Where linearOpt is a vector that contains a lot of LinearLayout objects that I have instantiated.
CODE:..
This is R.layout.itemrow xml:
But I received this error:
CODE:.................
View 1 Replies
View Related
Oct 20, 2010
I want to refresh my expandablelistview, but it seems there is no way to use notifyDataSetChanged()? how can i refresh my expandablelistview?
View 2 Replies
View Related
May 14, 2010
I'm trying to add a context menu to my ExpandableListView. I've implemented onCreateContextMenu() and onContextItemSelected() but if I hold my finger on a menu item context menu doesn't appear. What's my mistake?
View 1 Replies
View Related
Apr 24, 2010
My problem is when I want to refresh data in ExpandableListView while being in that current activity. I create adapter and when I want to add new data to list I call again constructor of that adapter(it is my private variable) with all new data....and then I call onContentChanged() method to redraw my list.
But what happens is that I cant expand my list any more...like it is blocked or something and logcat isn't saying anything...
This is the code that i call after setting new data in arraylists and maps:
CODE:....................
View 1 Replies
View Related
Nov 2, 2010
I'm trying to create a ExpandableListView in one activity. I've looked in apis demos, and I've created ExpandableListView. The problem is, that I need to have this ExpandableListView in activity that is already created, and not in a new one.
I've used this code:
CODE:..............
View 3 Replies
View Related
Nov 5, 2010
Is it possible for the child of an ExpandableListView also be a parent?
For example, I need something like the following: ParentA ChildA ChildB ParentB ChildC GrandchildA? GrandchildB? ParentC
View 4 Replies
View Related
Dec 2, 2009
I'm using an ExpandableListView in one of my activity in a RelativeLayout
CODE:.............
And I'm using a custom expandableListAdaptaer which group view is:
CODE:............
(Found on examples of API_Demos, ExpandableList1)
A user of my application report me this photo http://binomed-android-project.googlecode.com/issues/attachment?aid=-... As you can see, the indicator of group items is over the text of group item despite the padding of 36...
And if I'm running emulator WVGA800 or an emulator with "abstracted LCD density" to 240 I have the same problem, but with my phone (HTC G1), I don't have any problem.
What is strange is that I try the application API_Demo with an emulator WVGA800 or an emulator with "abstracted LCD density" to 240 and I go to ExpandableList1 activity and all is alright !
I also try to copy the inner class available in ExpandableList1 for adapter and I launch it into my activity and I also have the problem see on photo
I am forced to manage density into my adapters in order to adjust the padding?
View 3 Replies
View Related
Sep 16, 2010
I'm trying to customize the parent(or header) for an expandablelist and I haven't found a solution yet. I want an imageview and two textviews in the parent. This is driving me insane atm.
View 2 Replies
View Related
May 12, 2010
Is it possible to make a multiple choice list with android:choiceMode="multipleChoice" or setChoiceMode(ListView.CHOICE_MODE_MULTIPLE) on an ExpandableListView? I am able to do this with CheckBoxes on a plain ListView, but it doesn't seem to be working with ExpandableListView. In the latter, clicking the list item (either parent or child) does not affect the checkbox as it does in the former.
I have noticed that it is possible to click exactly on the checkbox to make it toggle, but this is a very small target.
View 1 Replies
View Related
Jun 4, 2010
I need to get item's index(position) knowing its ID while using ExpandableListView. Is there any way to do this without making complete hash id->index and searching it?
View 1 Replies
View Related