use of com.xiecc.seeWeather.modules.main.adapter.WeatherAdapter in project SeeWeather by xcc3641.
the class MainFragment method initView.
private void initView() {
if (mRefreshLayout != null) {
mRefreshLayout.setColorSchemeResources(android.R.color.holo_blue_bright, android.R.color.holo_green_light, android.R.color.holo_orange_light, android.R.color.holo_red_light);
mRefreshLayout.setOnRefreshListener(() -> mRefreshLayout.postDelayed(this::load, 1000));
}
mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
mAdapter = new WeatherAdapter(mWeather);
mRecyclerView.setAdapter(mAdapter);
}
use of com.xiecc.seeWeather.modules.main.adapter.WeatherAdapter in project SeeWeather by xcc3641.
the class DetailCityActivity method initViewWithData.
private void initViewWithData() {
Intent intent = getIntent();
Weather weather = (Weather) intent.getSerializableExtra(IntentKey.WEATHER);
if (weather == null) {
finish();
}
safeSetTitle(weather.basic.city);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
WeatherAdapter mAdapter = new WeatherAdapter(weather);
mRecyclerView.setAdapter(mAdapter);
}
Aggregations