中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

中國(guó)建設(shè)銀行安徽分行網(wǎng)站推廣什么軟件可以長(zhǎng)期賺錢

中國(guó)建設(shè)銀行安徽分行網(wǎng)站,推廣什么軟件可以長(zhǎng)期賺錢,加強(qiáng)政府網(wǎng)站信息內(nèi)容建設(shè)措施,咖啡網(wǎng)站建設(shè)市場(chǎng)分析04 Android基礎(chǔ)--RelativeLayout什么是RelativeLayout?RelativeLayout的常見(jiàn)用法:什么是RelativeLayout? 相對(duì)布局(RelativeLayout)是一種根據(jù)父容器和兄弟控件作為參照來(lái)確定控件位置的布局方式。 根據(jù)父容器定位 在相…

04 Android基礎(chǔ)--RelativeLayout

    • 什么是RelativeLayout?
    • RelativeLayout的常見(jiàn)用法:

什么是RelativeLayout?

相對(duì)布局(RelativeLayout)是一種根據(jù)父容器兄弟控件作為參照來(lái)確定控件位置的布局方式。

根據(jù)父容器定位
在相對(duì)布局中,可以通過(guò)以下的屬性讓的組合讓控件處于父容器左上角、右上角、左下角、右下角、上下左右居中,正居中等九個(gè)位置。屬性如下:

  1. android:layout_alignParentLeft=“true” 父容器左邊
  2. android:layout_alignParentRight=“true” 父容器右邊
  3. android:layout_alignParentTop=“true” 父容器頂部
  4. android:layout_alignParentBottom=“true” 父容器底部
  5. android:layout_centerHorizontal=“true” 水平方向居中
  6. android:layout_centerVertical=“true” 垂直方向居中
  7. android:layout_centerInParent=“true” 水平垂直都居中

在這里插入圖片描述

根據(jù)兄弟控件定位
在相對(duì)布局中,還支持通過(guò)已確定位置的控件作為參考來(lái)確定其他控件的位置,以下的屬性讓的組合讓控件處于另外控件左上角、右上角、左下角、右下角、正上方、正下方、正左方、正右方等位置。屬性如下:

  1. android:layout_toLeftOf=“@+id/button1” 在button1控件左方
  2. android:layout_toRightOf=“@+id/button1” 在button1控件右方
  3. android:layout_above=“@+id/button1” 在button1控件上方
  4. android:layout_below=“@+id/button1” 在button1控件下方
  5. android:layout_alignLeft=“@+id/button1” 與button1控件左邊平齊
  6. android:layout_alignRight=“@+id/button1” 與button1控件右邊平齊
  7. android:layout_alignTop=“@+id/button1” 與button1控件上邊平齊
  8. android:layout_alignBottom=“@+id/button1” 與button1控件下邊平齊

在這里插入圖片描述

RelativeLayout的常見(jiàn)用法:

第一種情況:常用的列表頁(yè)布局:
在這里插入圖片描述

    <RelativeLayoutandroid:layout_width="match_parent"android:layout_height="match_parent">// 標(biāo)題<includeandroid:id="@+id/title_layout"layout="@layout/title_layout"/>// 1.android:layout_below="@+id/title_layout";這個(gè)布局在title的下方// 2.android:layout_marginBottom="60dp";指定該屬性所在控件距下部最近控件的最小值;<androidx.swiperefreshlayout.widget.SwipeRefreshLayoutandroid:id="@+id/sw_layout"android:layout_width="match_parent"android:layout_height="match_parent"android:layout_below="@+id/title_layout"android:layout_marginBottom="60dp"><androidx.recyclerview.widget.RecyclerViewandroid:id="@+id/recyclerview"android:layout_width="match_parent"android:layout_height="match_parent" /></androidx.swiperefreshlayout.widget.SwipeRefreshLayout>// 3.android:layout_alignParentBottom="true";在父容器底部<LinearLayoutandroid:layout_alignParentBottom="true"><Buttonandroid:id="@+id/material_apply"android:layout_width="match_parent"android:layout_height="match_parent"/></LinearLayout></RelativeLayout>

第二種情況:常用的搜索抽屜布局:
搜索欄有很多,有滾動(dòng)條,重置與搜索按鈕在最底部。
在這里插入圖片描述

    <RelativeLayout>// 1. 添加滾動(dòng)條<androidx.core.widget.NestedScrollViewandroid:layout_width="match_parent"android:layout_height="match_parent"android:paddingHorizontal="20dp">// 2. 搜索欄需要 占滿全屏 <LinearLayoutandroid:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><TextViewstyle="@style/select_title"android:text="@string/material_type" /><androidx.recyclerview.widget.RecyclerViewandroid:id="@+id/madetails_recyclerview"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginTop="20dp" /><TextViewstyle="@style/select_title"android:layout_marginTop="20dp"android:text="@string/name_of_goods" /><EditTextandroid:id="@+id/madetails_name_of_goods"style="@style/select_ed"android:background="@drawable/select_ed_background"android:hint="@string/name_of_goods" /><TextViewstyle="@style/select_title"android:layout_marginTop="20dp"android:text="@string/model_of_goods" /><EditTextandroid:id="@+id/madetails_model_of_goods"style="@style/select_ed"android:background="@drawable/select_ed_background"android:hint="@string/model_of_goods" /><TextViewstyle="@style/select_title"android:layout_marginTop="20dp"android:text="@string/specification_of_goods" /><EditTextandroid:id="@+id/madetails_specification_of_goods"style="@style/select_ed"android:background="@drawable/select_ed_background"android:hint="@string/specification_of_goods" /><TextViewstyle="@style/select_title"android:layout_marginTop="20dp"android:text="@string/code_of_goods" /><EditTextandroid:id="@+id/madetails_code_of_goods"style="@style/select_ed"android:background="@drawable/select_ed_background"android:hint="@string/code_of_goods" /></LinearLayout></androidx.core.widget.NestedScrollView>// 3. android:layout_alignParentBottom="true";相對(duì)于根元素布局,在根元素的底部。<LinearLayoutstyle="@style/select_bottom_layout"android:layout_alignParentBottom="true"><Buttonandroid:id="@+id/reset_btn"android:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="2"android:background="@color/dark_blue"android:text="@string/reset"android:textColor="@color/white"android:textSize="22dp" /><Buttonandroid:id="@+id/filter_btn"android:layout_width="0dp"android:layout_height="match_parent"android:layout_weight="3"android:background="@color/colorAccent"android:text="@string/filter"android:textColor="@color/white"android:textSize="22dp" /></LinearLayout></RelativeLayout>

類似于這種布局的做法:1.上面的元素需要占滿全屏 2.下面的按鈕 android:layout_alignParentBottom="true" 相對(duì)父元素布局,在父元素的底部。

第三種情況:子頁(yè)面展示項(xiàng)
在這里插入圖片描述

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical""><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="vertical"><!--1. android:layout_alignParentLeft="true": 父容器左邊android:layout_alignParentRight="true" 父容器右邊android:layout_centerInParent="true" 水平垂直都居中--><RelativeLayout android:layout_width="match_parent"android:layout_height="60px"><TextViewandroid:layout_alignParentLeft="true"android:layout_centerInParent="true"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="測(cè)試" /><TextViewandroid:id="@+id/apply_form_tv"android:layout_alignParentRight="true"android:layout_centerInParent="true"android:layout_width="wrap_content"android:layout_height="wrap_content"tools:text="測(cè)試" /></RelativeLayout><!--測(cè)試--><RelativeLayout style="@style/sub_line"><TextViewandroid:layout_alignParentLeft="true"android:layout_centerInParent="true"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="測(cè)試" /><TextViewandroid:id="@+id/apply_form_tv"android:layout_alignParentRight="true"android:layout_centerInParent="true"android:layout_width="wrap_content"android:layout_height="wrap_content"tools:text="測(cè)試" /></RelativeLayout></LinearLayout></RelativeLayout>

對(duì)于這種展示形布局或者說(shuō)是提交型布局:1.<LinearLayout 標(biāo)簽可以讓其下的子布局頁(yè)面豎向排列 2.<RelativeLayout 標(biāo)簽:位于父容器左邊與父容器右邊,且水平豎直居中。

http://www.risenshineclean.com/news/35523.html

相關(guān)文章:

  • 珍島信息技術(shù)有限公司做網(wǎng)站服務(wù)網(wǎng)上營(yíng)銷方式和方法
  • 直播網(wǎng)站開(kāi)發(fā)核心技術(shù)如何做營(yíng)銷策劃方案
  • 小企業(yè)網(wǎng)站建設(shè)怎樣網(wǎng)絡(luò)優(yōu)化工程師騙局
  • 上傳網(wǎng)站的三種方法網(wǎng)絡(luò)營(yíng)銷工程師
  • 做網(wǎng)站申請(qǐng)什么商標(biāo)seo咨詢服務(wù)價(jià)格
  • 小說(shuō)網(wǎng)站虛擬主機(jī)網(wǎng)絡(luò)促銷
  • 建一個(gè)類似b站的網(wǎng)站多少錢百度用戶服務(wù)中心官網(wǎng)電話
  • 做搞笑視頻網(wǎng)站靠神魔賺錢好的競(jìng)價(jià)推廣外包公司
  • 2018網(wǎng)站外鏈怎么做谷歌seo顧問(wèn)
  • 棗莊網(wǎng)站設(shè)計(jì)淘寶指數(shù)在線查詢
  • 手機(jī)做網(wǎng)站怎么做網(wǎng)站快速收錄工具
  • 做游戲小網(wǎng)站是啥重慶百度seo整站優(yōu)化
  • 企業(yè)公司網(wǎng)站管理系統(tǒng)免費(fèi)建站免費(fèi)推廣的網(wǎng)站
  • 在網(wǎng)站插入微博靜態(tài)的網(wǎng)頁(yè)出的來(lái)到服務(wù)器出不來(lái)網(wǎng)站建設(shè)流程圖
  • 創(chuàng)意經(jīng)濟(jì)型網(wǎng)站建設(shè)個(gè)人網(wǎng)站推廣怎么做
  • 直銷軟件網(wǎng)站開(kāi)發(fā)網(wǎng)站權(quán)重怎么提高
  • 新聞網(wǎng)站建設(shè)項(xiàng)目可行性報(bào)告網(wǎng)站媒體推廣方案
  • 上海門戶網(wǎng)站制推薦友情鏈接
  • 湖南seo丈哥seo博客
  • 返利網(wǎng)站制作最新病毒感染
  • 網(wǎng)站標(biāo)簽名詞搜索排名優(yōu)化軟件
  • 會(huì)python做網(wǎng)站seo優(yōu)化前景
  • 天長(zhǎng)企業(yè)網(wǎng)站制作最近的新聞?wù)?/a>
  • 做賭石網(wǎng)站客服的經(jīng)驗(yàn)電子商務(wù)seo實(shí)訓(xùn)總結(jié)
  • 網(wǎng)站做短信接口具體方法正規(guī)的關(guān)鍵詞優(yōu)化軟件
  • 多用戶智能網(wǎng)站建設(shè)源碼洛陽(yáng)網(wǎng)站seo
  • 聊城開(kāi)發(fā)區(qū)建設(shè)局網(wǎng)站湖南專業(yè)關(guān)鍵詞優(yōu)化服務(wù)水平
  • 公務(wù)員 做網(wǎng)站 違法網(wǎng)站制作網(wǎng)站推廣
  • 手機(jī)網(wǎng)站改版公司百度關(guān)鍵詞熱度查詢工具
  • 做電影網(wǎng)站模板教學(xué)網(wǎng)站制作設(shè)計(jì)