use of carbon.component.DefaultIconEditTextItem in project Carbon by ZieIony.
the class RegisterActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_listcomponent);
Samples.initToolbar(this, getString(R.string.registerActivity_title));
RecyclerView recycler = (RecyclerView) findViewById(R.id.recycler);
RowListAdapter adapter = new RowListAdapter<>(DefaultIconEditTextItem.class, IconEditTextRow.FACTORY);
adapter.addFactory(DividerItem.class, DividerRow.FACTORY);
adapter.addFactory(DefaultIconPasswordItem.class, IconPasswordRow.FACTORY);
adapter.addFactory(DefaultIconDropDownItem.class, IconDropDownRow.FACTORY);
recycler.setAdapter(adapter);
adapter.setItems(Arrays.asList(new DefaultIconEditTextItem(new VectorDrawable(getResources(), R.raw.profile), "login", ""), new DefaultIconEditTextItem(new VectorDrawable(getResources(), R.raw.email), "email", ""), new DefaultIconPasswordItem(new VectorDrawable(getResources(), R.raw.lock), "password", ""), new DefaultIconPasswordItem(null, "retype password", ""), new DefaultIconDropDownItem<>(new VectorDrawable(getResources(), R.raw.gender), "sex", new String[] { "Male", "Female" }, "Male")));
}
Aggregations