Search in sources :

Example 1 with HorizontalListView

use of cn.qqtheme.framework.widget.HorizontalListView in project AndroidPicker by gzu-liyujiang.

the class FilePicker method makeFooterView.

@Nullable
@Override
protected View makeFooterView() {
    LinearLayout rootLayout = new LinearLayout(activity);
    rootLayout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT));
    rootLayout.setOrientation(LinearLayout.VERTICAL);
    rootLayout.setBackgroundColor(Color.WHITE);
    View lineView = new View(activity);
    lineView.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, 1));
    lineView.setBackgroundColor(0xFFDDDDDD);
    rootLayout.addView(lineView);
    HorizontalListView pathView = new HorizontalListView(activity);
    int height = ConvertUtils.toPx(activity, 30);
    pathView.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, height));
    pathView.setAdapter(pathAdapter);
    pathView.setBackgroundColor(Color.WHITE);
    pathView.setOnItemClickListener(new AdapterView.OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            refreshCurrentDirPath(pathAdapter.getItem(position));
        }
    });
    rootLayout.addView(pathView);
    return rootLayout;
}
Also used : HorizontalListView(cn.qqtheme.framework.widget.HorizontalListView) AdapterView(android.widget.AdapterView) HorizontalListView(cn.qqtheme.framework.widget.HorizontalListView) TextView(android.widget.TextView) View(android.view.View) AdapterView(android.widget.AdapterView) ListView(android.widget.ListView) LinearLayout(android.widget.LinearLayout) Nullable(android.support.annotation.Nullable)

Aggregations

Nullable (android.support.annotation.Nullable)1 View (android.view.View)1 AdapterView (android.widget.AdapterView)1 LinearLayout (android.widget.LinearLayout)1 ListView (android.widget.ListView)1 TextView (android.widget.TextView)1 HorizontalListView (cn.qqtheme.framework.widget.HorizontalListView)1