每次写到新东西哦,都想记下来 ,用了网络笔记 ,但是用笔记记载代码 ,看起来真不舒服,还是用博客记载吧 ,界面看起来舒服一点
<android.support.v4.widget.SwipeRefreshLayout android:id="@+id/swipe_refresh_layout_list" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@id/toolbar_room" android:layout_weight="1"> <ListView android:id="@+id/live_list" android:layout_width="match_parent" android:layout_height="match_parent" android:clickable="true" android:divider="@null" /> </android.support.v4.widget.SwipeRefreshLayout>
界面代码
Ac'ti'v'i't'y集成
SwipeRefreshLayout.OnRefreshListener,
mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh_layout_list); mSwipeRefreshLayout.setColorSchemeColors(getResources().getColor(android.R.color.holo_blue_bright), getResources().getColor(android.R.color.holo_green_light), getResources().getColor(android.R.color.holo_orange_light), getResources().getColor(android.R.color.holo_red_light)); mSwipeRefreshLayout.setOnRefreshListener(this);
实现继承类得方法
void onRefresh();