android 类似于 switch 但是又不太一样 麻烦看下怎么实现

图片说明

帮忙看下 这种效果怎么实现好 我用两个Button 但是设置背景之后稍微有点变形

这直接用viewpager啊 里面两个textview 滑动或者点击的时候切换背景色和字体颜色,ok

android:id="@+id/lin_pay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:orientation="horizontal"
android:layout_centerVertical="true"
android:layout_marginBottom="15dp"
android:layout_centerHorizontal="true">
android:id="@+id/tv_play"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="播放列表"
android:textColor="#fff"
android:gravity="center"
android:background="@drawable/pay_serach_item"/>
android:id="@+id/tv_desc"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="详情介绍"
android:textColor="#fff"
android:gravity="center"
android:background="@drawable/pay_serach_item"/>

android:layout_below="@id/lin_pay"
android:id="@+id/vpager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

                            private void ChangeBgColor(TextView v) {
v.setBackground(this.getResources().getDrawable(R.drawable.bg_kuang));
TextView []menus = new TextView[]{tv_unpay, tv_pay,tv_ok};

for(int i= 0;i<menus.length;i++){
    if(v != menus[i]){
        menus[i].setBackground(this.getResources().getDrawable(R.drawable.yixiadankuangkuang));
    }
}

@Override
public void onClick(View v) {
    switch(v.getId()){
    case R.id.tv_unpay:
        vPager.setCurrentItem(0);
        ChangeColor(tv_unpay);
        break;
    case R.id.tv_play:
        vPager.setCurrentItem(1);
        ChangeBgColor(tv_play);
        break;
    case R.id.tv_desc:
        vPager.setCurrentItem(2);
        ChangeBgColor(tv_desc);
        break;
    }

}

这是典型的RadioButton呀