Search in sources :

Example 61 with BaseAdapter

use of android.widget.BaseAdapter in project PreLollipopTransition by takahirom.

the class ListViewFragment method onCreateView.

@Nullable
@Override
public View onCreateView(final LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View inflate = inflater.inflate(R.layout.fragment_list_view, container, false);
    final ListView listView = (ListView) inflate.findViewById(R.id.list);
    listView.setAdapter(new BaseAdapter() {

        @Override
        public int getCount() {
            return 10;
        }

        @Override
        public Object getItem(int position) {
            return null;
        }

        @Override
        public long getItemId(int position) {
            return 0;
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            return inflater.inflate(R.layout.list_row, parent, false);
        }
    });
    listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            final Intent intent = new Intent(getContext(), SubActivity.class);
            ActivityTransitionLauncher.with(getActivity()).from(view.findViewById(R.id.image)).launch(intent);
        }
    });
    return inflate;
}
Also used : SubActivity(com.kogitune.prelollipoptransition.SubActivity) ViewGroup(android.view.ViewGroup) Intent(android.content.Intent) View(android.view.View) AdapterView(android.widget.AdapterView) ListView(android.widget.ListView) ListView(android.widget.ListView) AdapterView(android.widget.AdapterView) BaseAdapter(android.widget.BaseAdapter) Nullable(android.support.annotation.Nullable)

Example 62 with BaseAdapter

use of android.widget.BaseAdapter in project xabber-android by redsolution.

the class PreferencesFragment method onResume.

@Override
public void onResume() {
    super.onResume();
    BaseAdapter adapter = (BaseAdapter) getPreferenceScreen().getRootAdapter();
    adapter.notifyDataSetChanged();
    PreferenceManager.getDefaultSharedPreferences(getActivity()).registerOnSharedPreferenceChangeListener(this);
}
Also used : BaseAdapter(android.widget.BaseAdapter)

Example 63 with BaseAdapter

use of android.widget.BaseAdapter in project SuperRecyclerView by Malinskiy.

the class SwipeLayout method isDisabledInAdapterView.

/**
 * if working in {@link android.widget.AdapterView}, we should response {@link android.widget.Adapter}
 * isEnable(int position).
 *
 * @return true when item is enabled, else disabled.
 */
private boolean isDisabledInAdapterView() {
    AdapterView adapterView = getAdapterView();
    boolean enable = true;
    if (adapterView != null) {
        Adapter adapter = adapterView.getAdapter();
        if (adapter != null) {
            int p = adapterView.getPositionForView(SwipeLayout.this);
            if (adapter instanceof BaseAdapter) {
                enable = ((BaseAdapter) adapter).isEnabled(p);
            } else if (adapter instanceof ListAdapter) {
                enable = ((ListAdapter) adapter).isEnabled(p);
            }
        }
    }
    return !enable;
}
Also used : AdapterView(android.widget.AdapterView) Adapter(android.widget.Adapter) BaseAdapter(android.widget.BaseAdapter) ListAdapter(android.widget.ListAdapter) BaseAdapter(android.widget.BaseAdapter) ListAdapter(android.widget.ListAdapter)

Aggregations

BaseAdapter (android.widget.BaseAdapter)63 View (android.view.View)30 AdapterView (android.widget.AdapterView)26 ViewGroup (android.view.ViewGroup)22 TextView (android.widget.TextView)21 ListAdapter (android.widget.ListAdapter)16 Adapter (android.widget.Adapter)15 ListView (android.widget.ListView)11 PackageInfoData (dev.ukanth.ufirewall.Api.PackageInfoData)8 RemoteAdapterConnectionCallback (android.widget.RemoteViewsAdapter.RemoteAdapterConnectionCallback)7 Intent (android.content.Intent)5 LayoutInflater (android.view.LayoutInflater)5 SuppressLint (android.annotation.SuppressLint)4 Context (android.content.Context)4 AbsListView (android.widget.AbsListView)4 GridView (android.widget.GridView)4 ImageView (android.widget.ImageView)4 RecyclerView (android.support.v7.widget.RecyclerView)3 MenuItem (android.view.MenuItem)3 HeaderViewListAdapter (android.widget.HeaderViewListAdapter)3