본문 바로가기

Study/Android

[Android] 채널 새로고침, 핀치 투 줌(Pinch-To-Zoom) 라이브러리, Custom ToogleButton

채널 새로고침

<android.support.v4.widget.SwipeRefreshLayout
    android:id="@+id/channel_broadcast_refresh"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <android.support.v7.widget.RecyclerView
        android:id="@+id/channel_broadcast_list"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:scrollbars="none"
        />
</android.support.v4.widget.SwipeRefreshLayout>
// 채널 새로고침
mBinding.channelBroadcastRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
    @Override
    public void onRefresh() {
        inquiryChannelList();
    }
});
mBinding.channelBroadcastRefresh.setColorSchemeResources(R.color.colorAccent);

mBinding.channelBroadcastRefresh.setRefreshing(false);

 

 

 

핀치 투 줌(Pinch-To-Zoom) 라이브러리

출처 : https://www.alphafactory.co.kr/post/2013/07/13/pinch-to-zoom-library/

 

 

 

Custom ToogleButton

출처 : https://androidician.wordpress.com/2014/09/24/android-custom-toggle-button-example-ios-like-toggle-buttons/