码迷,mamicode.com
首页 > 移动开发 > 详细

仿拉手团购App2--当前城市选择Activity

时间:2017-05-16 00:40:26      阅读:234      评论:0      收藏:0      [点我收藏+]

标签:show   pre   activity   extc   ffffff   width   height   raw   add   

首页中点击城市TextView调转到当前城市选择Activity

技术分享

fragment_city.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/city_item_bg" >

    <EditText
        android:id="@+id/city_et_search"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="10dp"
        android:padding="10dp"
        android:drawableLeft="@drawable/wb_search_icon"
        android:drawablePadding="5dp"
        android:hint="@string/input_city_to_search"
        android:background="@drawable/edittext_selector"/>

    <RelativeLayout
        android:id="@+id/city_fra_content_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/city_et_search">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/city_rv_city_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_toLeftOf="@+id/city_sidebar"/>

        <TextView
            android:id="@+id/city_tv_show"
            android:layout_width="80dp"
            android:layout_height="80dp"
            android:layout_centerInParent="true"
            android:background="@android:color/darker_gray"
            android:gravity="center"
            android:textColor="#ffffffff"
            android:textSize="30dp"
            android:visibility="gone" />

        <android.support.v7.widget.RecyclerView
            android:id="@+id/city_rv_search_result"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_toLeftOf="@+id/city_sidebar"
            android:visibility="gone"/>

        <TextView
            android:id="@+id/city_tv_no_result"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="@string/not_find_city"
            android:visibility="gone"/>

        <com.myxh.coolshopping.ui.widget.SidebarView
            android:id="@+id/city_sidebar"
            android:layout_width="25dp"
            android:layout_height="match_parent"
            android:layout_alignParentRight="true"
            android:layout_marginRight="2dp"
            android:layout_marginTop="7dp" />
    </RelativeLayout>

</RelativeLayout>

  

 

仿拉手团购App2--当前城市选择Activity

标签:show   pre   activity   extc   ffffff   width   height   raw   add   

原文地址:http://www.cnblogs.com/ganchuanpu/p/6859082.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!