Tag: expandablelistview

在列表项上滑动操作?

android中有没有办法在特定列表项上实现滑动操作? 我正在使用ExpandableListView,我希望能够刷一个特定的列表项来获取它的视图,最好是子/组位置。 这可能吗?

可展开的列表视图不会扩展

你需要准备这样的屏幕 这是我的可扩展列表视图的代码 适配器类: NewAdapter.java public class NewAdapter extends BaseExpandableListAdapter { public ArrayList groupItem; ArrayList tempChild; public ArrayList Childtem = new ArrayList(); public LayoutInflater minflater; public Activity activity; public NewAdapter(ArrayList grList, ArrayList childItem) { groupItem = grList; this.Childtem = childItem; } public void setInflater(LayoutInflater mInflater, Activity act) { this.minflater = mInflater; activity = act; } @Override […]

如何对群组和孩子进行排序Android中的可扩展列表视图?

我在mysql中有两个表,通过ids’id_catprods’和’ID_Cat’绑定’Categories’和’products’。 到目前为止一直很好,我正在使用带有自定义适配器的“ExpandableListView”在Android上工作,一切正常,但找不到用他们的产品对类别进行排序的解决方案。 谁能帮我? Json成绩: { “productos”: [{ “id_catprods”: “1”, “id_oferta”: “197”, “id_producto”: “1”, “nombr_cat”: “Bocatas”, “id_cat”: “1”, “nombre_producto”: “Lomo”, “precio”: “4”, “actions”: [] }, { “id_catprods”: “2”, “id_oferta”: “197”, “id_producto”: “2”, “nombr_cat”: “Pizzas”, “id_cat”: “2”, “nombre_producto”: “Serranito”, “precio”: “4”, “actions”: [] }], “errorCode”: 0, “errorString”: “Todo correcto” } 主要代码: // DownloadJSON AsyncTask private class DownloadJSON […]

Android:ExpandableListViews和Checkboxes

我最近正在玩可扩展列表视图。 我试图获得一个列表视图,其中有一个复选框作为子视图的元素之一。 我找到了这个教程, http://mylifewithandroid.blogspot.com/2010/02/expandable-lists-and-check-boxes.html ,它看起来很完美。 然而,当我编译它并开始玩它时,我意识到它非常错。 选中一个组中的一个框可能会导致另一个组中的随机框检查或取消选中。 这是我能找到的唯一一个教程,这似乎是一个可以在很多应用程序中使用的东西,所以我想知道,还有其他任何好的教程或资源处理这个吗? 或者甚至更好,是否有人愿意展示他们自己的代码让这个工作… 谢谢 千电子伏

滚动ExpendableListView后计数器的值发生变化

我有一个ExpandableListView项目和列表项我有TextView有两个按钮来增加或减少TextView上的点击值。 每次我尝试滚动列表时都会出现此问题。 如果我增加一个项目然后滚动列表值混合(因为ListView保持循环其视图),我不知道如何解决它。 我已经尝试了很多我在这里找到的方法,所以是的,这可能是重复的,但我无法用我找到的任何方法解决我的问题。 我的ExpandableListAdapter.java import android.content.Context; import android.graphics.Typeface; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseExpandableListAdapter; import android.widget.Button; import android.widget.TextView; import java.util.HashMap; import java.util.List; public class ExpandableListAdapter extends BaseExpandableListAdapter { public static class ViewHolder { TextView childText; TextView counterText; Button addItemButton; Button deleteItemButton; int quantity = 0; } private Context context; private List listDataHeader; […]

如何使用JSON数组制作ExpandableListView

我想创建一个ExpandableListView,它从服务器(JSON数组)的响应中获取其组及其子组的数据。 这是我的json: [ { ” “begdate”: “23/07/2013”, “nama”: “OPTIK INTERNASIONAL”, “img_id”: 2, “alamat”: “Jl. Nasional No 23 Meulaboh”, “enddate”: “23/07/2015”, }, { “begdate”: “01/05/2013”, “nama”: “EL JOHN SMOKING LOUNGE”, “img_id”: 3, “alamat”: “Bandara Sultan Iskandar Muda, Banda Aceh”, “enddate”: “30/04/2014”, }, { “begdate”: “09/11/2012”, “nama”: “ESPRESSO COFFE”, “img_id”: 2 “alamat”: “JL. SOEKARNO HATTA No. 16-17, […]