Search in sources :

Example 1 with CompatTextView

use of dev.dworks.apps.anexplorer.ui.CompatTextView in project AnExplorer by 1hakr.

the class DirectoryFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    final Context context = inflater.getContext();
    final Resources res = context.getResources();
    final View view = inflater.inflate(R.layout.fragment_directory, container, false);
    mProgressBar = (MaterialProgressBar) view.findViewById(R.id.progressBar);
    mEmptyView = (CompatTextView) view.findViewById(android.R.id.empty);
    mListView = (ListView) view.findViewById(R.id.list);
    mListView.setOnItemClickListener(mItemListener);
    mListView.setMultiChoiceModeListener(mMultiListener);
    mListView.setRecyclerListener(mRecycleListener);
    // Indent our list divider to align with text
    final Drawable divider = mListView.getDivider();
    final boolean insetLeft = res.getBoolean(R.bool.list_divider_inset_left);
    final int insetSize = res.getDimensionPixelSize(R.dimen.list_divider_inset);
    if (insetLeft) {
        mListView.setDivider(new InsetDrawable(divider, insetSize, 0, 0, 0));
    } else {
        mListView.setDivider(new InsetDrawable(divider, 0, 0, insetSize, 0));
    }
    mGridView = (GridView) view.findViewById(R.id.grid);
    mGridView.setOnItemClickListener(mItemListener);
    mGridView.setMultiChoiceModeListener(mMultiListener);
    mGridView.setRecyclerListener(mRecycleListener);
    return view;
}
Also used : Context(android.content.Context) Drawable(android.graphics.drawable.Drawable) BitmapDrawable(android.graphics.drawable.BitmapDrawable) InsetDrawable(android.graphics.drawable.InsetDrawable) InsetDrawable(android.graphics.drawable.InsetDrawable) Resources(android.content.res.Resources) ImageView(android.widget.ImageView) GridView(android.widget.GridView) View(android.view.View) AdapterView(android.widget.AdapterView) TextView(android.widget.TextView) ListView(android.widget.ListView) AbsListView(android.widget.AbsListView) CompatTextView(dev.dworks.apps.anexplorer.ui.CompatTextView) Point(android.graphics.Point)

Aggregations

Context (android.content.Context)1 Resources (android.content.res.Resources)1 Point (android.graphics.Point)1 BitmapDrawable (android.graphics.drawable.BitmapDrawable)1 Drawable (android.graphics.drawable.Drawable)1 InsetDrawable (android.graphics.drawable.InsetDrawable)1 View (android.view.View)1 AbsListView (android.widget.AbsListView)1 AdapterView (android.widget.AdapterView)1 GridView (android.widget.GridView)1 ImageView (android.widget.ImageView)1 ListView (android.widget.ListView)1 TextView (android.widget.TextView)1 CompatTextView (dev.dworks.apps.anexplorer.ui.CompatTextView)1