Search in sources :

Example 1 with AboutListAdapter

use of org.odk.collect.android.adapters.AboutListAdapter in project collect by opendatakit.

the class AboutActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.about_layout);
    DaggerUtils.getComponent(this).inject(this);
    initToolbar();
    int[][] items = { { R.drawable.ic_outline_website_24, R.string.odk_website, R.string.odk_website_summary }, { R.drawable.ic_outline_forum_24, R.string.odk_forum, R.string.odk_forum_summary }, { R.drawable.ic_outline_share_24, R.string.tell_your_friends, R.string.tell_your_friends_msg }, { R.drawable.ic_outline_rate_review_24, R.string.leave_a_review, R.string.leave_a_review_msg }, { R.drawable.ic_outline_stars_24, R.string.all_open_source_licenses, R.string.all_open_source_licenses_msg } };
    RecyclerView recyclerView = findViewById(R.id.recyclerView);
    RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(this);
    recyclerView.setLayoutManager(layoutManager);
    recyclerView.setAdapter(new AboutListAdapter(items, this, this));
    recyclerView.setItemAnimator(new DefaultItemAnimator());
    websiteTabHelper = new ExternalWebPageHelper();
    forumTabHelper = new ExternalWebPageHelper();
    websiteUri = Uri.parse(getString(R.string.app_url));
    forumUri = Uri.parse(getString(R.string.forum_url));
}
Also used : AboutListAdapter(org.odk.collect.android.adapters.AboutListAdapter) RecyclerView(androidx.recyclerview.widget.RecyclerView) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) DefaultItemAnimator(androidx.recyclerview.widget.DefaultItemAnimator) ExternalWebPageHelper(org.odk.collect.android.utilities.ExternalWebPageHelper)

Aggregations

DefaultItemAnimator (androidx.recyclerview.widget.DefaultItemAnimator)1 LinearLayoutManager (androidx.recyclerview.widget.LinearLayoutManager)1 RecyclerView (androidx.recyclerview.widget.RecyclerView)1 AboutListAdapter (org.odk.collect.android.adapters.AboutListAdapter)1 ExternalWebPageHelper (org.odk.collect.android.utilities.ExternalWebPageHelper)1