Search in sources :

Example 1 with QuranListAdapter

use of com.quran.labs.androidquran.ui.helpers.QuranListAdapter in project quran_android by quran.

the class BookmarksFragment method onCreateView.

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.quran_list, container, false);
    final Context context = getActivity();
    recyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
    recyclerView.setLayoutManager(new LinearLayoutManager(context));
    recyclerView.setItemAnimator(new DefaultItemAnimator());
    bookmarksAdapter = new QuranListAdapter(context, recyclerView, new QuranRow[0], true);
    bookmarksAdapter.setQuranTouchListener(this);
    recyclerView.setAdapter(bookmarksAdapter);
    return view;
}
Also used : Context(android.content.Context) QuranRow(com.quran.labs.androidquran.ui.helpers.QuranRow) QuranListAdapter(com.quran.labs.androidquran.ui.helpers.QuranListAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator) Nullable(android.support.annotation.Nullable)

Example 2 with QuranListAdapter

use of com.quran.labs.androidquran.ui.helpers.QuranListAdapter in project quran_android by quran.

the class JuzListFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.quran_list, container, false);
    final Context context = getActivity();
    mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
    mRecyclerView.setHasFixedSize(true);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    final QuranListAdapter adapter = new QuranListAdapter(context, mRecyclerView, getJuz2List(), false);
    mRecyclerView.setAdapter(adapter);
    return view;
}
Also used : Context(android.content.Context) QuranListAdapter(com.quran.labs.androidquran.ui.helpers.QuranListAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) JuzView(com.quran.labs.androidquran.widgets.JuzView) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator)

Example 3 with QuranListAdapter

use of com.quran.labs.androidquran.ui.helpers.QuranListAdapter in project quran_android by quran.

the class SuraListFragment method onCreateView.

@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    final View view = inflater.inflate(R.layout.quran_list, container, false);
    final Context context = getActivity();
    mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
    mRecyclerView.setHasFixedSize(true);
    mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    final QuranListAdapter adapter = new QuranListAdapter(context, mRecyclerView, getSuraList(), false);
    mRecyclerView.setAdapter(adapter);
    return view;
}
Also used : Context(android.content.Context) QuranListAdapter(com.quran.labs.androidquran.ui.helpers.QuranListAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator)

Aggregations

Context (android.content.Context)3 DefaultItemAnimator (android.support.v7.widget.DefaultItemAnimator)3 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)3 RecyclerView (android.support.v7.widget.RecyclerView)3 View (android.view.View)3 QuranListAdapter (com.quran.labs.androidquran.ui.helpers.QuranListAdapter)3 Nullable (android.support.annotation.Nullable)1 QuranRow (com.quran.labs.androidquran.ui.helpers.QuranRow)1 JuzView (com.quran.labs.androidquran.widgets.JuzView)1