use of com.quran.labs.androidquran.ui.adapter.TranslationsAdapter in project quran_android by quran.
the class TranslationManagerActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
((QuranApplication) getApplication()).getApplicationComponent().inject(this);
setContentView(R.layout.translation_manager);
translationSwipeRefresh = findViewById(R.id.translation_swipe_refresh);
translationRecycler = findViewById(R.id.translation_recycler);
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(this);
translationRecycler.setLayoutManager(mLayoutManager);
adapter = new TranslationsAdapter(this);
translationRecycler.setAdapter(adapter);
databaseDirectory = quranFileUtils.getQuranDatabaseDirectory(this);
final ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setTitle(R.string.prefs_translations);
}
quranSettings = QuranSettings.getInstance(this);
presenter.bind(this);
presenter.getTranslationsList(false);
onClickDownloadDisposable = adapter.getOnClickDownloadSubject().subscribe(this::downloadItem);
onClickRemoveDisposable = adapter.getOnClickRemoveSubject().subscribe(this::removeItem);
translationSwipeRefresh.setOnRefreshListener(this::onRefresh);
}
Aggregations