微信里面左边固定右边可以显示其它的文字,点整行都能跳到相应界面这种布局怎么布局啊?
android:id="@+id/ll_save_flow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:clickable="true"
android:background="@drawable/test_btn_click_white"
android:orientation="horizontal"
android:padding="10dp"
>
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="省流量"
android:textColor="@color/black"
android:textSize="@dimen/text_default_size"
/>
<TextView
android:id="@+id/tv_save_flow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="较省流量(智能下图)"
android:textColor="@color/blacks"
android:textSize="@dimen/text_default_size"
/>
</LinearLayout>
ll_save_flow.setOnclickListener(this);
像这样就可以
在行的布局设置点击事件啊,比如第一行:头像文字与头像图片的父布局是RelativeLayout,那么就用RelativeLayout的id绑定点击事件实现跳转。
在一行的所在的LinearLayout或RelativeLayout 中设置id然后写对应的点击事件
给该行的布局设置id,然后点击事件不再是单个控件,而是整个布局设置点击事件即可实现