個人設定頁面配置 小例子

來源:互聯網
上載者:User

標籤:

:

 

layout布局:

<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"                android:layout_height="match_parent" android:background="@drawable/personcenter_home_bg">    <FrameLayout        android:layout_marginTop="56dp" android:layout_marginLeft="@dimen/set_margin"        android:layout_width="@dimen/set_login_size"        android:layout_height="@dimen/set_login_size" android:id="@+id/flyt_head">        <TextView            android:layout_width="match_parent" android:layout_height="match_parent"            android:background="@drawable/personcenter_head_bg" android:id="@+id/txt_head_logout"            android:gravity="center_horizontal" android:paddingTop="20dp" android:textSize="@dimen/textsize_40px"            android:textColor="@color/white" android:text="@string/login"            android:drawableTop="@drawable/personcenter_head_src" android:drawablePadding="10dp"/>        <ImageView            android:visibility="gone" android:id="@+id/img_head_login" android:layout_width="match_parent"            android:layout_height="match_parent" android:src="@drawable/icon"/>    </FrameLayout>    <TextView        android:layout_centerHorizontal="true" android:layout_marginTop="15dp"        android:id="@+id/txt_person_name"        android:layout_below="@id/flyt_head"        android:visibility="gone"        android:gravity="center_horizontal"        android:layout_alignLeft="@id/flyt_head"        android:textSize="@dimen/textsize_26px" android:textColor="@color/white"        android:layout_width="@dimen/set_login_size" android:layout_height="wrap_content"/>    <RelativeLayout        android:id="@+id/rlyt_notice" android:layout_below="@id/flyt_head" android:layout_marginTop="10dp"        android:layout_alignLeft="@id/flyt_head" android:background="@drawable/personcenter_home_notice_bg"        android:layout_width="wrap_content" android:layout_height="wrap_content">        <TextView            android:layout_centerHorizontal="true" android:layout_marginTop="15dp"            android:textSize="@dimen/textsize_20px" android:textColor="@color/white" android:text="@string/notice"            android:layout_width="wrap_content" android:layout_height="wrap_content"/>    </RelativeLayout>    <TextView        android:layout_alignTop="@id/flyt_head" android:layout_alignParentRight="true"        android:layout_marginRight="@dimen/set_margin"        style="@style/SetButton"        android:background="@drawable/personcenter_mycourses_btn_bg" android:id="@+id/txt_mycourses"        android:text="@string/my_courses"        android:drawableTop="@drawable/personcenter_mycourses_btn_src"/>    <FrameLayout        android:layout_below="@id/txt_mycourses"        android:layout_alignParentRight="true" android:layout_marginRight="@dimen/set_margin"        android:layout_marginTop="13dp"        android:id="@+id/flyt_registryorlogout"        android:layout_width="@dimen/set_button_size" android:layout_height="@dimen/set_button_size">        <TextView            style="@style/SetButton"            android:background="@drawable/personcenter_registry_btn_bg" android:id="@+id/txt_registry"            android:text="@string/registry"            android:drawableTop="@drawable/personcenter_registry_btn_src"/>        <TextView            android:visibility="gone" style="@style/SetButton"            android:background="@drawable/personcenter_registry_btn_bg" android:id="@+id/txt_logout"            android:text="@string/logout"            android:drawableTop="@drawable/personcenter_logout_btn_src"/>    </FrameLayout>    <TextView        android:layout_below="@id/flyt_registryorlogout" android:layout_alignParentRight="true"        android:background="@drawable/personcenter_mycollections_btn_bg"        android:id="@+id/txt_mycollections"        android:text="@string/my_collection"        android:visibility="invisible"        android:drawableTop="@drawable/personcenter_mycollections_btn_src"        android:layout_marginRight="@dimen/set_margin" android:layout_marginTop="13dp" style="@style/SetButton"        />    <TextView        android:layout_toLeftOf="@id/flyt_registryorlogout"        style="@style/SetButton"        android:background="@drawable/personcenter_settings_btn_bg" android:layout_marginRight="13dp"        android:id="@+id/txt_settings" android:layout_alignTop="@id/txt_mycollections"        android:text="@string/settings"        android:drawableTop="@drawable/personcenter_settings_btn_src"/>    <TextView        android:layout_toLeftOf="@id/txt_settings" style="@style/SetButton"        android:background="@drawable/personcenter_feedback_btn_bg" android:layout_marginRight="13dp"        android:layout_alignTop="@id/txt_mycollections"        android:id="@+id/txt_feedback"        android:text="@string/feedback" android:drawableTop="@drawable/personcenter_feedback_btn_src"        /></RelativeLayout>
<style name="SetButton">        <item name="android:layout_height">@dimen/set_button_size</item>        <item name="android:layout_width">@dimen/set_button_size</item>        <item name="android:gravity">center_horizontal</item>        <item name="android:paddingTop">15dp</item>        <item name="android:textSize">@dimen/textsize_34px</item>        <item name="android:textColor">@color/white</item>        <item name="android:drawablePadding">7dp</item>    </style>

 

個人設定頁面配置 小例子

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.