显示activity_main的布局
<android.support.v7.widget.RecyclerView
android:id="@+id/frag_shop_first_rc"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
></android.support.v7.widget.RecyclerView>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center_vertical"
android:layout_marginBottom="@dimen/dp_10"
>
<CheckBox
android:id="@+id/cb_all"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:text="全选" />
<Button
android:id="@+id/btn_price"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:gravity="center"
android:paddingLeft="20dp"
android:paddingRight="20dp"
android:background="#ff0606"
android:textColor="#fff"
android:text="结算" />
<TextView
android:id="@+id/tv_count"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:layout_marginRight="20dp"
android:layout_toLeftOf="@+id/btn_price"
android:gravity="center_vertical"
android:text="总计:0元" />
</RelativeLayout>
**这是就像一店下加入的商品展示**
<android.support.v7.widget.RecyclerView
android:id="@+id/first_item_rc"
android:layout_width="match_parent"
android:layout_height="match_parent"></android.support.v7.widget.RecyclerView>
这个是商品的页面
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/goods_item_image"
android:layout_width=“120dp”
android:layout_height=“120dp”
android:layout_margin="@dimen/dp_10"/>
<com.example.myapplication.ui.weight.ZhangXi
android:id="@+id/calculator"
android:layout_alignParentRight=“true”
android:layout_width=“wrap_content”
android:layout_marginTop=“70dp”
android:layout_height=“wrap_content”/>
这个是加减功能的布局
<TextView
android:id="@+id/tv_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:inputType="number"
android:text="@string/jisuanqi" />
<Button
android:id="@+id/btn_add"
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40"
android:background="@null"
android:text="+"
android:padding="@dimen/dp_10" />