Android :: Dynamically Build Data For ExpandableListView?
May 3, 2010
I'm using "ExpandableListView" in my application to display some options that . I need a way to build automatically the information to show when a group is expanded as the information might be different each time the group is expanded.
View 1 Replies
Oct 7, 2010
I have an ExpandableListView (ELV) with the groups having LinearLayout. I have set the height of the group to some value (38dip in this case, equivalent to two lines of text). If the group heading is long and would take more than 2 lines, it is not shown properly in the ELV item - some part of the view gets scrolled. On the other hand, if I change android:layout_height to "wrap_content" in the LinearLayout, the groups always show all the lines. But the line widths are variable, i.e., short titles show up with only 1 line and long titles show up with 2, 3 or 4 lines. That looks ugly. I would like to implement the height to be something like max("38dip", "wrap_content"). Is there a way to do this?
Even programmatically, I do not seem to be getting the actual height of the group if I set android:layout_height to "wrap_content". Any suggestions there?
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
Oct 1, 2010
I am new to android.What i did is i am creating a xml file with some data.Now i need to add some additional data to existing xml file dynamically.How can i done this..
View 1 Replies
View Related
Nov 9, 2010
I have a use case in my application, where after certain point, I need to associate an data with an activity. So whenever an intent with an action and the data type is fired, my activity can be opened. I know that it is possible to associate a data type with an activity statically via AndroidManifest.xml.
Is it possible to register the data type for an activity dynamically and programatically?
View 1 Replies
View Related
Jun 24, 2010
I downloaded the Android 2.2 source code and try to build it. When I executed the make command, I got an error here like this build/core/java.mk:20: *** frameworks/ex/common: Invalid LOCAL_SDK_VERSION '8' Choices are: current 4 5 6 7. Stop. Then I changed the frameworks/ex/common/Android.mk to LOCAL_SDK_VERSION = 8 from LOCAL_SDK_VERSION = 7. Next place, build/core/java.mk:20: *** external/jsr305: Invalid LOCAL_SDK_VERSION '8' Choices are: current 4 5 6 7. Stop. I changed the external/jsr305/Android.mk to LOCAL_SDK_VERSION = 8 from LOCAL_SDK_VERSION = 7
Last one, build/core/java.mk:20: *** external/guava: Invalid LOCAL_SDK_VERSION '8' Choices are: current 4 5 6 7. Stop. I changed the external/guava/Android.mk to LOCAL_SDK_VERSION = 8 from LOCAL_SDK_VERSION = 7
By these changes the code started the compilation.
1. Why the error occured?
2. Changes which I did is correct or not?
View 3 Replies
View Related
Jun 23, 2010
can some owners of Android devices come forward and publish the data that their phones provide as:
os.android.Build.BOARD
os.android.Build.BRAND
os.android.Build.DEVICE
os.android.Build.DISPLAY
os.android.Build.MODEL
os.android.Build.PRODUCT
I'm wondering what's the best identifying combination, looking for stats.
View 1 Replies
View Related
Feb 21, 2013
I have a phone with a MT6577. The vendor (Wiko) published the kernel source code. So, i'm trying to build it. I can get the zImage. I converted it to boot.img but i can't boot with it on my phone.build a good zImage? (if you want to try) : URL...
cp mediatek-configs .config
TARGET_PRODUCT=s9081 MTK_ROOT_CUSTOM=../mediatek/custom make
# sudo mtk-tools/repack-MT65xx.pl -boot zImage boot.img-ramdisk boot.img
MTK-Tools by Bruno MartinsMT65xx repack script (last update: 27-01-2013)
Repacking boot image...
Ramdisk size: 2046 blocs
Repacked boot image into 'boot.img'.
Here are the Warnings I got when compiling
mediatek/platform/mt6577/kernel/drivers/video/tvc_drv.c:61:5: warning: "FIXED_WVGA_PARAMS" is not defined
net/ipv4/tcp.c: In function 'tcp_nuke_addr':
include/net/ipv6.h:338: warning: 'in6' may be used uninitialized in this function
net/ipv4/tcp.c:3367: note: 'in6' was declared here
In file included from net/ipv4/netfilter/ipt_LOG.c:27:
include/net/netfilter/xt_log.h: In function 'sb_close':
[code]....
View 9 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
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
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
Aug 11, 2010
The default behavior of ExpandableListView is to collapse a group when its header is clicked. Is it possible to prevent this from happening?
I've tried: Setting OnTouchListener on the list. This interferes with scrolling. Setting an OnGroupClickListener on the list (in onCreate()). This works for all clicks after the first.
Why might the OnGroupClickListener miss the first click?
View 2 Replies
View Related
Oct 5, 2010
I have a 2d array of strings. I would like to use a spinner to allow users to select values from the 2nd lvl of the array but I would like to display the selection options in a expandablelistview using the values of the 1st lvl of the array as category headers. Is this possible, how this should be implemented ?
View 1 Replies
View Related
Sep 3, 2010
Im trying to implement an activity that uses ExpandableListView and I have gotten so far but now I have found some strange behavior.
My activity is meant to record food intake as specified by the user. they have a choice of menus (breakfast, lunch and dinner - the outer group) which expand to show their contents.
when a user clicks on an inner menu item a dialog appears asking them for the qty. once they enter a qty and dismiss the dialog the text on the menu item changes to reflect the quantity of that item that has been consumed
The above image shows the list in a closed state.
Below is the list after I have opened the lunch menu and clicked on 'Potato Chips' and indicating a Quantity of 1. As you can see the 'Potato' itemtext has now been changed to reflect the Qty of 1.
The strange part happens now. if I click on 'Lunch' and close the list and then click on it again re-opening it, the 'Qty X 1' text has jumped to another item (Milk)
Each time I open and close the list it jumps back and forth between the two items. Also if I open up other items, such as breakfast, I find that they too have now gotten items with 'Qty X 1' even though I havent clicked them.
The bits of code that are relevant are as such:
The XML for a child element:
CODE:................
The code thats triggered on clicking a child element:
CODE:..................
The above code opens a dialog, accepts a value for quantity, appends the list element to reflect this, also saves to database and sets a textview with the selected item and quantity.
View 1 Replies
View Related
May 26, 2010
Is it possible to switch from a TableLayout to an ExpandableListView? How? I tried using ViewFlipper but the fact that ExpandableListView doesn't use XML threw a wrench in it.
View 1 Replies
View Related
May 4, 2010
I have the following problem: I would like to change value of ExpandableListView's cell on click. How should I do that?
Here is what I'm using:
CODE:............
Application is in progress stage, so attrVal will contain several attributes ( which can be put or not depend on some logic), so I'm using this type of adapter and this way of filling cells' data.
fieldsInList - external variable of LinkedHashMap type.
I have a function which can change one of the member's of fieldsInList variable. How should I notify my expListAdapter or ExpanableListView to be refreshed?
View 2 Replies
View Related
Aug 28, 2010
I have subclassed ExpandableListActivity to create an activity that presents a simple tree view of the 'world at large' and allows the user to select one for further use by the app. I am having trouble setting focus programatically. One thing that baffles me is that I can use the D-pad to set focus on any of the child or group items in my ExpandableListView, but inside my onChildClick() callback, isFocusable() returns false. If I can set focus with the D-pad, how can isFocusable() return false?
My goal is to avoid having the user have to touch individual ExpandableListView entries to select them and to provide a couple of buttons to move the focus up and down inside the list. I want selection to be easy for folks with no D-pad or with a phone that only presents the D-pad when in landscape mode (e.g. Droid) .
Is there some way I can programatically inject D-pad key clicks into my app input event stream?
View 2 Replies
View Related