Search in sources :

Example 6 with AboutAdapter

use of io.praveen.typenote.SQLite.AboutAdapter in project Android-NotesApp by HelloPraveenIO.

the class ContributorsActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_contributors);
    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder().setDefaultFontPath("fonts/whitney.ttf").setFontAttrId(R.attr.fontPath).build());
    Typeface font2 = Typeface.createFromAsset(getAssets(), "fonts/whitney.ttf");
    SpannableStringBuilder SS = new SpannableStringBuilder("Contributors");
    SS.setSpan(new CustomTypefaceSpan("", font2), 0, SS.length(), Spanned.SPAN_EXCLUSIVE_INCLUSIVE);
    if (getSupportActionBar() != null) {
        getSupportActionBar().setTitle(SS);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    }
    List<String> l = new ArrayList<>();
    l.add("Praveen Thirumurugan");
    l.add("Srikar Nanduri");
    l.add("Bharath Raj Kumar");
    l.add("Keerthana Ravichandran");
    final RecyclerView recyclerView = findViewById(R.id.contributorsRecyclerView);
    AboutAdapter mAdapter = new AboutAdapter(l);
    RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
    recyclerView.setLayoutManager(mLayoutManager);
    recyclerView.setItemAnimator(new DefaultItemAnimator());
    recyclerView.addItemDecoration(new DividerItemDecoration(this, LinearLayoutManager.VERTICAL));
    recyclerView.setAdapter(mAdapter);
}
Also used : Typeface(android.graphics.Typeface) SpannableStringBuilder(android.text.SpannableStringBuilder) ArrayList(java.util.ArrayList) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(android.support.v7.widget.DividerItemDecoration) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator) AboutAdapter(io.praveen.typenote.SQLite.AboutAdapter) RecyclerView(android.support.v7.widget.RecyclerView) SpannableStringBuilder(android.text.SpannableStringBuilder)

Aggregations

Typeface (android.graphics.Typeface)6 DefaultItemAnimator (android.support.v7.widget.DefaultItemAnimator)6 DividerItemDecoration (android.support.v7.widget.DividerItemDecoration)6 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)6 RecyclerView (android.support.v7.widget.RecyclerView)6 SpannableStringBuilder (android.text.SpannableStringBuilder)6 AboutAdapter (io.praveen.typenote.SQLite.AboutAdapter)6 ArrayList (java.util.ArrayList)6 Intent (android.content.Intent)2 View (android.view.View)2 BillingProcessor (com.anjlab.android.iab.v3.BillingProcessor)2 ClickListener (io.praveen.typenote.SQLite.ClickListener)2 RecyclerTouchListener (io.praveen.typenote.SQLite.RecyclerTouchListener)2