use of wangdaye.com.geometricweather.ui.decotarion.ListDecoration in project GeometricWeather by WangDaYeeeeee.
the class AlertActivity method initWidget.
private void initWidget() {
this.container = (CoordinatorLayout) findViewById(R.id.activity_alert_container);
Toolbar toolbar = (Toolbar) findViewById(R.id.activity_alert_toolbar);
toolbar.setNavigationIcon(R.drawable.ic_toolbar_back);
toolbar.setNavigationOnClickListener(this);
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.activity_alert_recyclerView);
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
recyclerView.addItemDecoration(new ListDecoration(this));
recyclerView.setAdapter(new AlertAdapter(alarmList));
}
use of wangdaye.com.geometricweather.ui.decotarion.ListDecoration in project GeometricWeather by WangDaYeeeeee.
the class ManageActivity method initWidget.
private void initWidget() {
this.container = findViewById(R.id.activity_manage_container);
this.cardView = findViewById(R.id.activity_manage_searchBar);
cardView.setOnClickListener(this);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
cardView.setTransitionName(getString(R.string.transition_activity_search_bar));
}
this.recyclerView = findViewById(R.id.activity_manage_recyclerView);
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
recyclerView.addItemDecoration(new ListDecoration(this));
recyclerView.setAdapter(adapter);
ItemTouchHelper itemTouchHelper = new ItemTouchHelper(new LocationSwipeCallback(ItemTouchHelper.UP | ItemTouchHelper.DOWN, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT));
itemTouchHelper.attachToRecyclerView(recyclerView);
}
use of wangdaye.com.geometricweather.ui.decotarion.ListDecoration in project GeometricWeather by WangDaYeeeeee.
the class SearcActivity method initWidget.
private void initWidget() {
this.container = findViewById(R.id.activity_search_container);
findViewById(R.id.activity_search_searchBar).setOnClickListener(this);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
findViewById(R.id.activity_search_searchBar).setTransitionName(getString(R.string.transition_activity_search_bar));
}
this.searchContainer = findViewById(R.id.activity_search_searchContainer);
findViewById(R.id.activity_search_backBtn).setOnClickListener(this);
findViewById(R.id.activity_search_clearBtn).setOnClickListener(this);
this.editText = findViewById(R.id.activity_search_editText);
editText.setOnEditorActionListener(this);
this.recyclerView = findViewById(R.id.activity_search_recyclerView);
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
recyclerView.addItemDecoration(new ListDecoration(this));
recyclerView.setAdapter(adapter);
this.progressView = findViewById(R.id.activity_search_progress);
progressView.setAlpha(0);
AnimatorSet animationSet = (AnimatorSet) AnimatorInflater.loadAnimator(this, R.animator.search_container_in);
animationSet.setStartDelay(350);
animationSet.setTarget(searchContainer);
animationSet.start();
}
Aggregations