Search in sources :

Example 26 with ExpandableListView

use of android.widget.ExpandableListView in project AnExplorer by 1hakr.

the class RootsFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    final View view = inflater.inflate(R.layout.fragment_roots, container, false);
    mList = (ExpandableListView) view.findViewById(android.R.id.list);
    mList.setOnChildClickListener(mItemListener);
    mList.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
    DisplayMetrics metrics = new DisplayMetrics();
    getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);
    int width = Utils.dpToPx(302);
    boolean rtl = Utils.isRTL();
    int leftPadding = rtl ? 10 : 50;
    int rightPadding = rtl ? 50 : 10;
    int leftWidth = width - Utils.dpToPx(leftPadding);
    int rightWidth = width - Utils.dpToPx(rightPadding);
    if (Utils.hasJellyBeanMR2()) {
        mList.setIndicatorBoundsRelative(leftWidth, rightWidth);
    } else {
        mList.setIndicatorBounds(leftWidth, rightWidth);
    }
    return view;
}
Also used : ImageView(android.widget.ImageView) View(android.view.View) AdapterView(android.widget.AdapterView) TextView(android.widget.TextView) ListView(android.widget.ListView) ExpandableListView(android.widget.ExpandableListView) DisplayMetrics(android.util.DisplayMetrics)

Example 27 with ExpandableListView

use of android.widget.ExpandableListView in project ultrasonic by ultrasonic.

the class PullToRefreshExpandableListView method createRefreshableView.

@Override
protected ExpandableListView createRefreshableView(Context context, AttributeSet attrs) {
    final ExpandableListView lv;
    if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
        lv = new InternalExpandableListViewSDK9(context, attrs);
    } else {
        lv = new InternalExpandableListView(context, attrs);
    }
    // Set it to this so it can be used in ListActivity/ListFragment
    lv.setId(android.R.id.list);
    return lv;
}
Also used : ExpandableListView(android.widget.ExpandableListView)

Example 28 with ExpandableListView

use of android.widget.ExpandableListView in project iNaturalistAndroid by inaturalist.

the class PullToRefreshExpandableListView method createRefreshableView.

@Override
protected ExpandableListView createRefreshableView(Context context, AttributeSet attrs) {
    final ExpandableListView lv;
    if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
        lv = new InternalExpandableListViewSDK9(context, attrs);
    } else {
        lv = new InternalExpandableListView(context, attrs);
    }
    // Set it to this so it can be used in ListActivity/ListFragment
    lv.setId(android.R.id.list);
    return lv;
}
Also used : ExpandableListView(android.widget.ExpandableListView)

Example 29 with ExpandableListView

use of android.widget.ExpandableListView in project Osmand by osmandapp.

the class OsmandExpandableListFragment method onCreateView.

@Override
public View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, Bundle savedInstanceState) {
    View v = createView(inflater, container);
    listView = (ExpandableListView) v.findViewById(android.R.id.list);
    listView.setOnChildClickListener(this);
    if (this.adapter != null) {
        listView.setAdapter(this.adapter);
    }
    return v;
}
Also used : View(android.view.View) ExpandableListView(android.widget.ExpandableListView)

Example 30 with ExpandableListView

use of android.widget.ExpandableListView in project BloodHub by kazijehangir.

the class FaqFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View rootView = (View) inflater.inflate(R.layout.fragment_faq, container, false);
    expandableListView = (ExpandableListView) rootView.findViewById(R.id.expandableListView);
    fillData();
    listAdapter = new myExpListAdapter(getActivity(), faq, topics);
    expandableListView.setAdapter(listAdapter);
    final Activity activity = getActivity();
    expandableListView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {

        @Override
        public boolean onChildClick(ExpandableListView expandableListView, View view, int i, int i1, long l) {
            Toast.makeText(activity, faq.get(i) + ": " + topics.get(faq.get(i)).get(i1), Toast.LENGTH_LONG).show();
            return false;
        }
    });
    return rootView;
}
Also used : Activity(android.app.Activity) View(android.view.View) ExpandableListView(android.widget.ExpandableListView) ExpandableListView(android.widget.ExpandableListView)

Aggregations

ExpandableListView (android.widget.ExpandableListView)86 View (android.view.View)59 TextView (android.widget.TextView)30 AdapterView (android.widget.AdapterView)18 Intent (android.content.Intent)16 ListView (android.widget.ListView)16 ArrayList (java.util.ArrayList)16 AbsListView (android.widget.AbsListView)14 DialogInterface (android.content.DialogInterface)11 ImageView (android.widget.ImageView)11 List (java.util.List)11 Builder (android.app.AlertDialog.Builder)9 ViewGroup (android.view.ViewGroup)9 ExpandableListAdapter (android.widget.ExpandableListAdapter)7 AbsSpinner (android.widget.AbsSpinner)6 QuickContactBadge (android.widget.QuickContactBadge)6 TabHost (android.widget.TabHost)6 AdapterBinding (com.android.ide.common.rendering.api.AdapterBinding)6 ResourceReference (com.android.ide.common.rendering.api.ResourceReference)6 SessionParams (com.android.ide.common.rendering.api.SessionParams)6