最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Android實(shí)現(xiàn)簡(jiǎn)單QQ登錄頁(yè)面

 更新時(shí)間:2022年04月24日 14:45:05   作者:Lssの老父親  
這篇文章主要為大家詳細(xì)介紹了Android實(shí)現(xiàn)簡(jiǎn)單QQ登錄頁(yè)面,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

Android開(kāi)發(fā)實(shí)現(xiàn)極為簡(jiǎn)單的QQ登錄頁(yè)面,供大家參考,具體內(nèi)容如下

設(shè)計(jì)一個(gè)簡(jiǎn)單QQ登錄頁(yè)面,無(wú)任何功能。然后打包安裝到手機(jī)。

1.首先創(chuàng)建一個(gè)空白頁(yè)面

2.打開(kāi)樣式設(shè)計(jì)的頁(yè)面

在activity_main.xml中寫(xiě)入代碼

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:background="#E6E6E6"http://改背景色
? ? tools:context=".MainActivity">
? ? <RelativeLayout android:layout_width="match_parent"http://相對(duì)布局
? ? ? ? android:layout_height="match_parent"
? ? ? ? android:layout_marginTop="60dp"http://距頂部距離
? ? ? ? android:background="#E6E6E6"http://改背景色
? ? ? ? android:orientation="vertical">

? ? <ImageView//放圖片
? ? ? ? android:id="@+id/iv"
? ? ? ? android:layout_width="70dp"
? ? ? ? android:layout_height="70dp"
? ? ? ? android:layout_centerHorizontal="true"http://居中
? ? ? ? android:layout_marginTop="40dp"
? ? ? ? android:background="@drawable/head"/>//圖片的位置

? ? <LinearLayout//線性布局
? ? ? ? android:id="@+id/ll_number"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="wrap_content"
? ? ? ? android:layout_below="@id/iv"http://在imageview下面
? ? ? ? android:layout_centerVertical="true"http://居中
? ? ? ? android:layout_marginBottom="5dp"
? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? android:layout_marginRight="10dp"
? ? ? ? android:layout_marginTop="15dp"
? ? ? ? android:background="#ffffff">
? ? ? ? <TextView//顯示文本
? ? ? ? ? ? android:id="@+id/tv_number"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? android:padding="10dp"
? ? ? ? ? ? android:text="賬號(hào):"
? ? ? ? ? ? android:textColor="#000"
? ? ? ? ? ? android:textSize="20sp"/>
? ? ? ? <EditText//輸入框
? ? ? ? ? ? android:id="@+id/et_number"
? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? android:layout_marginLeft="5dp"
? ? ? ? ? ? android:background="@null"
? ? ? ? ? ? android:padding="10dp"/>
? ? </LinearLayout>
? ? <LinearLayout
? ? ? ? android:id="@+id/ll_password"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="wrap_content"
? ? ? ? android:layout_below="@id/ll_number"
? ? ? ? android:layout_centerVertical="true"
? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? android:layout_marginRight="10dp"
? ? ? ? android:background="#ffffff">
? ? ? ? <TextView
? ? ? ? ? ? android:id="@+id/tv_password"
? ? ? ? ? ? android:layout_width="wrap_content"
? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? android:padding="10dp"
? ? ? ? ? ? android:text="密碼:"
? ? ? ? ? ? android:textColor="#000"
? ? ? ? ? ? android:textSize="20sp"/>
? ? ? ? <EditText
? ? ? ? ? ? android:id="@+id/et_password"
? ? ? ? ? ? android:layout_width="match_parent"
? ? ? ? ? ? android:layout_height="wrap_content"
? ? ? ? ? ? android:layout_marginLeft="5dp"
? ? ? ? ? ? android:layout_toRightOf="@id/tv_password"
? ? ? ? ? ? android:background="@null"
? ? ? ? ? ? android:inputType="textPassword"http://密文顯示
? ? ? ? ? ? android:padding="10dp"/>
? ? </LinearLayout>
? ? <Button//登錄按鈕
? ? ? ? android:id="@+id/btn_login"
? ? ? ? android:layout_width="match_parent"
? ? ? ? android:layout_height="wrap_content"
? ? ? ? android:layout_below="@id/ll_password"
? ? ? ? android:layout_marginLeft="10dp"
? ? ? ? android:layout_marginRight="10dp"
? ? ? ? android:layout_marginTop="50dp"
? ? ? ? android:background="#3C8DC4"
? ? ? ? android:text="登錄"
? ? ? ? android:textColor="#ffffff"
? ? ? ? android:textSize="20sp"/>
? ? </RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

在虛擬機(jī)里跑一下

效果還算可以吧
試試能不能打包一下,安裝到手機(jī)上。

報(bào)錯(cuò)了…

網(wǎng)上查了一下解決辦法。在build.gradle文件里添點(diǎn)代碼:

lintOptions {
? ? ? ? checkReleaseBuilds false
? ? ? ? abortOnError false
? ? }

成功了。

挺不錯(cuò)

參考圖書(shū)《Android移動(dòng)開(kāi)發(fā)基礎(chǔ)案例教程》

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • Android多線程斷點(diǎn)續(xù)傳下載實(shí)現(xiàn)代碼

    Android多線程斷點(diǎn)續(xù)傳下載實(shí)現(xiàn)代碼

    這篇文章主要介紹了Android多線程斷點(diǎn)續(xù)傳下載實(shí)現(xiàn)代碼,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-11-11
  • 修改Android Studio 的 Logcat 緩沖區(qū)大小操作

    修改Android Studio 的 Logcat 緩沖區(qū)大小操作

    這篇文章主要介紹了修改Android Studio 的 Logcat 緩沖區(qū)大小操作,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2020-04-04
  • Flutter中數(shù)據(jù)庫(kù)的使用教程詳解

    Flutter中數(shù)據(jù)庫(kù)的使用教程詳解

    在Flutter開(kāi)發(fā)過(guò)程中,有時(shí)需要對(duì)數(shù)據(jù)進(jìn)行本地的持久化存儲(chǔ),使用sp文件形式雖然也能解決問(wèn)題,但是有時(shí)數(shù)據(jù)量較大的時(shí)候,顯然我們文件形式就不太合適了,這時(shí)候我們就需要使用數(shù)據(jù)庫(kù)進(jìn)行存儲(chǔ)。本文將詳細(xì)講講Flutter中數(shù)據(jù)庫(kù)的使用,需要的可以參考一下
    2022-04-04
  • Android頭像上傳功能的實(shí)現(xiàn)代碼(獲取頭像加剪切)

    Android頭像上傳功能的實(shí)現(xiàn)代碼(獲取頭像加剪切)

    最近在做一個(gè)頭像上傳的項(xiàng)目,下面小編給大家分享Android頭像上傳功能的實(shí)現(xiàn)代碼,需要的的朋友參考下吧
    2017-08-08
  • Android性能優(yōu)化方案詳情

    Android性能優(yōu)化方案詳情

    這篇文章主要給大家分享的是Android項(xiàng)目工程內(nèi)的一些性能優(yōu)化方式,文章圍繞Android項(xiàng)目工程優(yōu)化方式展開(kāi)內(nèi)容,需要的朋友可以參考一下文章的具體詳情,希望對(duì)你有所幫助
    2021-11-11
  • Android如何調(diào)整線程調(diào)用棧大小

    Android如何調(diào)整線程調(diào)用棧大小

    這篇文章主要介紹了Android如何調(diào)整線程調(diào)用棧大小,幫助大家更好的進(jìn)行Android開(kāi)發(fā),完善自身程序,感興趣的朋友可以了解下
    2020-10-10
  • Android Spinner與適配器模式詳解及實(shí)例代碼

    Android Spinner與適配器模式詳解及實(shí)例代碼

    這篇文章主要介紹了Android Spinner與適配器模式詳解相關(guān)資料,并附代碼實(shí)例,需要的朋友可以參考下
    2016-10-10
  • Android Studio開(kāi)發(fā)中Gradle各種常見(jiàn)報(bào)錯(cuò)問(wèn)題解決方案

    Android Studio開(kāi)發(fā)中Gradle各種常見(jiàn)報(bào)錯(cuò)問(wèn)題解決方案

    這篇文章主要為大家介紹了Android Studio開(kāi)發(fā)中Gradle各種常見(jiàn)報(bào)錯(cuò)問(wèn)題解決方案,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2023-12-12
  • Android中碎片的使用方法詳解

    Android中碎片的使用方法詳解

    這篇文章主要介紹了Android中碎片的使用方法詳解,其實(shí)碎片很簡(jiǎn)單,但是網(wǎng)上胡亂充數(shù)的博文太多了,以至于我們有時(shí)候覺(jué)得比較亂,今天就來(lái)簡(jiǎn)單講解一下碎片的使用,需要的朋友可以參考下
    2019-06-06
  • android九宮格可分頁(yè)加載控件使用詳解

    android九宮格可分頁(yè)加載控件使用詳解

    這篇文章主要介紹了android九宮格可分頁(yè)加載控件的使用方法,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2020-02-02

最新評(píng)論

昭苏县| 兴安县| 准格尔旗| 兴山县| 麻城市| 永丰县| 上杭县| 秦安县| 大英县| 建德市| 灵石县| 阿克苏市| 伊吾县| 肥东县| 富民县| 张家口市| 汾阳市| 新安县| 田阳县| 江达县| 丹棱县| 弋阳县| 溆浦县| 通化市| 连云港市| 泰安市| 莲花县| 神农架林区| 于都县| 安西县| 东阳市| 棋牌| 金阳县| 溧水县| 宜州市| 扶余县| 增城市| 玛多县| 浦县| 永德县| 哈尔滨市|