国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

【android studio實(shí)踐計(jì)算機(jī)界面】

這篇具有很好參考價(jià)值的文章主要介紹了【android studio實(shí)踐計(jì)算機(jī)界面】。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

新建項(xiàng)目
1、打開(kāi)Android Studio
【android studio實(shí)踐計(jì)算機(jī)界面】

2、創(chuàng)建項(xiàng)目
點(diǎn)擊右上角【New Project】
選擇“Empty Activity”,然后點(diǎn)擊“Next
【android studio實(shí)踐計(jì)算機(jī)界面】

3、設(shè)置項(xiàng)目基本信息
【android studio實(shí)踐計(jì)算機(jī)界面】

4、等待項(xiàng)目文件加載
【android studio實(shí)踐計(jì)算機(jī)界面】

打開(kāi)界面文件
res/layout/activity_main.xml
【android studio實(shí)踐計(jì)算機(jī)界面】

點(diǎn)擊右上角Split,切換顯示模式
【android studio實(shí)踐計(jì)算機(jī)界面】

1、設(shè)置線性布局
在這里插入圖片描述
【android studio實(shí)踐計(jì)算機(jī)界面】

2、增加子容器
【android studio實(shí)踐計(jì)算機(jī)界面】

3、添加內(nèi)容
第一個(gè)子容器
【android studio實(shí)踐計(jì)算機(jī)界面】

完整代碼

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="120dp">

    <TextView
        android:id="@+id/resultTv"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="10dp"
        android:background="#0a0a0a"
        android:gravity="end|bottom"
        android:padding="10dp"
        android:textColor="#FFFFFF"
        android:textSize="25sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="40dp"></LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>

第二個(gè)子容器

完整代碼

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="120dp">

    <TextView
        android:id="@+id/resultTv"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="10dp"
        android:background="#0a0a0a"
        android:gravity="end|bottom"
        android:padding="10dp"
        android:textColor="#FFFFFF"
        android:textSize="25sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="40dp">

    <TextView
        android:id="@+id/clearBtn"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginEnd="15dp"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="C"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>

第三個(gè)子容器
【android studio實(shí)踐計(jì)算機(jī)界面】

后面8和9按鈕,代碼和前面的按鈕7類似,僅僅text屬性和id屬性不一樣

加號(hào)按鈕
【android studio實(shí)踐計(jì)算機(jī)界面】

完整代碼

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="120dp">

    <TextView
        android:id="@+id/resultTv"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="10dp"
        android:background="#0a0a0a"
        android:gravity="end|bottom"
        android:padding="10dp"
        android:textColor="#FFFFFF"
        android:textSize="25sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="40dp">

    <TextView
        android:id="@+id/clearBtn"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginEnd="15dp"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="C"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp">

    <TextView
        android:id="@+id/sevenBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="7"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/eightBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="8"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/nineBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="9"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/addBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#FFFFFF"
        android:gravity="center"
        android:text="+"
        android:textColor="#000000"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>

第四個(gè)
【android studio實(shí)踐計(jì)算機(jī)界面】

后面5和6按鈕,代碼和前面的按鈕4類似,僅僅text屬性和id屬性不一樣
減號(hào)按鈕
【android studio實(shí)踐計(jì)算機(jī)界面】

完整代碼

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="120dp">

    <TextView
        android:id="@+id/resultTv"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="10dp"
        android:background="#0a0a0a"
        android:gravity="end|bottom"
        android:padding="10dp"
        android:textColor="#FFFFFF"
        android:textSize="25sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="40dp">

    <TextView
        android:id="@+id/clearBtn"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginEnd="15dp"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="C"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp">

    <TextView
        android:id="@+id/sevenBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="7"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/eightBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="8"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/nineBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="9"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/addBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#FFFFFF"
        android:gravity="center"
        android:text="+"
        android:textColor="#000000"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp">

    <TextView
        android:id="@+id/fourBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="4"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/fiveBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="5"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/sixBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="6"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/minusBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#FFFFFF"
        android:gravity="center"
        android:text="-"
        android:textColor="#000000"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>

第五個(gè)
【android studio實(shí)踐計(jì)算機(jī)界面】

后面2和3按鈕,代碼和前面的按鈕1類似,僅僅text屬性和id屬性不一樣

除號(hào)按鈕
【android studio實(shí)踐計(jì)算機(jī)界面】

完整代碼

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="120dp">

    <TextView
        android:id="@+id/resultTv"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="10dp"
        android:background="#0a0a0a"
        android:gravity="end|bottom"
        android:padding="10dp"
        android:textColor="#FFFFFF"
        android:textSize="25sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="40dp">

    <TextView
        android:id="@+id/clearBtn"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginEnd="15dp"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="C"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp">

    <TextView
        android:id="@+id/sevenBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="7"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/eightBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="8"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/nineBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="9"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/addBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#FFFFFF"
        android:gravity="center"
        android:text="+"
        android:textColor="#000000"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp">

    <TextView
        android:id="@+id/fourBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="4"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/fiveBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="5"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/sixBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="6"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/minusBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#FFFFFF"
        android:gravity="center"
        android:text="-"
        android:textColor="#000000"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp">

    <TextView
        android:id="@+id/oneBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="1"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/twoBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="2"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/threeBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="3"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/divideBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#FFFFFF"
        android:gravity="center"
        android:text="÷"
        android:textColor="#000000"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp"></LinearLayout>
</LinearLayout>

第六個(gè)
【android studio實(shí)踐計(jì)算機(jī)界面】

后面點(diǎn)按鈕,代碼和前面的按鈕0類似,僅僅text屬性和id屬性不一樣

等號(hào)
【android studio實(shí)踐計(jì)算機(jī)界面】

完整代碼

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="120dp">

    <TextView
        android:id="@+id/resultTv"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="10dp"
        android:background="#0a0a0a"
        android:gravity="end|bottom"
        android:padding="10dp"
        android:textColor="#FFFFFF"
        android:textSize="25sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="40dp">

    <TextView
        android:id="@+id/clearBtn"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginEnd="15dp"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="C"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp">

    <TextView
        android:id="@+id/sevenBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="7"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/eightBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="8"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/nineBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="9"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/addBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#FFFFFF"
        android:gravity="center"
        android:text="+"
        android:textColor="#000000"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp">

    <TextView
        android:id="@+id/fourBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="4"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/fiveBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="5"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/sixBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="6"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/minusBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#FFFFFF"
        android:gravity="center"
        android:text="-"
        android:textColor="#000000"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp">

    <TextView
        android:id="@+id/oneBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="1"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/twoBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="2"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/threeBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="3"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/divideBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#FFFFFF"
        android:gravity="center"
        android:text="÷"
        android:textColor="#000000"
        android:textSize="30sp" />
</LinearLayout>

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="75dp">

    <TextView
        android:id="@+id/zeroBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="0"
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/dotBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#0a0a0a"
        android:gravity="center"
        android:text="."
        android:textColor="#FFFFFF"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/getResultBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#F56615"
        android:gravity="center"
        android:text="="
        android:textColor="#000000"
        android:textSize="30sp" />

    <TextView
        android:id="@+id/multiplyBtn"
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="15dp"
        android:layout_marginTop="10dp"
        android:layout_marginEnd="15dp"
        android:layout_marginBottom="10dp"
        android:layout_weight="1"
        android:background="#FFFFFF"
        android:gravity="center"
        android:text="×"
        android:textColor="#000000"
        android:textSize="30sp" />
</LinearLayout>

計(jì)算器界面完成效果
【android studio實(shí)踐計(jì)算機(jī)界面】文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-418076.html

到了這里,關(guān)于【android studio實(shí)踐計(jì)算機(jī)界面】的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 向量?jī)?nèi)積在計(jì)算機(jī)視覺(jué)中的實(shí)踐

    計(jì)算機(jī)視覺(jué)(Computer Vision)是人工智能領(lǐng)域的一個(gè)重要分支,涉及到從圖像和視頻中抽取高級(jí)信息的過(guò)程。向量?jī)?nèi)積(Dot Product)是線性代數(shù)的基本概念之一,在計(jì)算機(jī)視覺(jué)中具有廣泛的應(yīng)用。本文將詳細(xì)介紹向量?jī)?nèi)積在計(jì)算機(jī)視覺(jué)中的實(shí)踐,包括核心概念、算法原理、代碼實(shí)例等

    2024年02月19日
    瀏覽(20)
  • 從入門到實(shí)踐:計(jì)算機(jī)視覺(jué)圖像分類完全指南

    從入門到實(shí)踐:計(jì)算機(jī)視覺(jué)圖像分類完全指南

    計(jì)算機(jī)視覺(jué)圖像分類是計(jì)算機(jī)視覺(jué)領(lǐng)域的一個(gè)重要分支,它的目標(biāo)是讓計(jì)算機(jī)能夠識(shí)別并分類不同的圖像。在本文中,我們將介紹計(jì)算機(jī)視覺(jué)圖像分類的基本概念、流程和常用算法。 ? 一、圖像分類的基本概念 圖像分類是指將輸入的圖像自動(dòng)分類到預(yù)定義的一組類別中的過(guò)

    2024年02月10日
    瀏覽(23)
  • 深度學(xué)習(xí)核心技術(shù)與實(shí)踐之計(jì)算機(jī)視覺(jué)篇

    深度學(xué)習(xí)核心技術(shù)與實(shí)踐之計(jì)算機(jī)視覺(jué)篇

    非書(shū)中全部?jī)?nèi)容,只是寫了些自認(rèn)為有收獲的部分 (1)視覺(jué)皮層的神經(jīng)元是一列一列組織起來(lái)的,每一列神經(jīng)元只喜歡某一種特定的形狀或者某些簡(jiǎn)單的線條組合,而不是魚(yú)、老鼠、鮮花 (2)視覺(jué)的前期,并不是對(duì)魚(yú)或老鼠進(jìn)行整體識(shí)別,而是對(duì)簡(jiǎn)單的形狀結(jié)構(gòu)進(jìn)行處理,

    2024年02月03日
    瀏覽(24)
  • C++計(jì)算機(jī)視覺(jué)庫(kù)OpenCV在Visual Studio 2022的配置方法

    C++計(jì)算機(jī)視覺(jué)庫(kù)OpenCV在Visual Studio 2022的配置方法

    ??本文介紹在 Visual Studio 2022 中配置、編譯 C++ 計(jì)算機(jī)視覺(jué)庫(kù) OpenCV 的方法。 ??首先,我們進(jìn)行 OpenCV 庫(kù)的下載與安裝。作為一個(gè)開(kāi)源的庫(kù),我們直接在其官方下載網(wǎng)站(https://opencv.org/releases/)中進(jìn)行下載即可;如下圖所示,我們首先選擇需要下載的操作系統(tǒng)。 ??隨后

    2024年02月16日
    瀏覽(28)
  • Visual Studio 2010 軟件安裝教程(附下載鏈接)——計(jì)算機(jī)二級(jí)專用編程軟件

    Visual Studio 2010 軟件安裝教程(附下載鏈接)——計(jì)算機(jī)二級(jí)專用編程軟件

    提取碼:2wAK https://www.123pan.com/s/JRpSVv-9injv.html 1.如圖所示,雙擊打開(kāi)【Visual Studio 2010簡(jiǎn)體中文旗艦版】文件夾 2.如圖所示,找到“Setup”文件夾打開(kāi),雙擊運(yùn)行“setup” 3.如圖所示,取消勾選安裝體驗(yàn)的信息,然后點(diǎn)擊“下一步” 4.點(diǎn)擊“我已閱讀并接受許可條款”,點(diǎn)擊“下一

    2024年02月05日
    瀏覽(55)
  • 計(jì)算機(jī)圖形學(xué)中的曲線問(wèn)題——拉格朗日插值曲線繪制實(shí)踐

    計(jì)算機(jī)圖形學(xué)中的曲線問(wèn)題——拉格朗日插值曲線繪制實(shí)踐

    限于篇幅,我們將在這篇文章中介紹拉格朗日插值曲線繪制實(shí)踐,主文章鏈接: GGN_2015 計(jì)算機(jī)圖形學(xué)中的曲線問(wèn)題 在主文章中我們已經(jīng)介紹了拉格朗日插值函數(shù)的繪制方法。給定一個(gè)函數(shù)必須通過(guò)的點(diǎn)的集合,保證任意兩點(diǎn) x x x 指不同,我們就能構(gòu)造出一條拉格朗日插值函

    2024年02月14日
    瀏覽(29)
  • 中國(guó)大學(xué)生計(jì)算機(jī)設(shè)計(jì)大賽—人工智能實(shí)踐賽賽道—賽后感想

    中國(guó)大學(xué)生計(jì)算機(jī)設(shè)計(jì)大賽—人工智能實(shí)踐賽賽道—賽后感想

    中國(guó)大學(xué)生計(jì)算機(jī)設(shè)計(jì)大賽是我國(guó)高校面向本科生最早的賽事之一,是全國(guó)普通高校大學(xué)生競(jìng)賽排行榜榜單賽事之一。自2008年開(kāi)賽至2019年,一直由教育部高校與計(jì)算機(jī)相關(guān)教指委等或獨(dú)立或聯(lián)合主辦。大賽的目的是以賽促學(xué)、以賽促教、以賽促創(chuàng),為國(guó)家培養(yǎng)德智體美勞全

    2024年01月16日
    瀏覽(26)
  • 【深度學(xué)習(xí):圖像分割指南】計(jì)算機(jī)視覺(jué)中的圖像分割指南:最佳實(shí)踐

    【深度學(xué)習(xí):圖像分割指南】計(jì)算機(jī)視覺(jué)中的圖像分割指南:最佳實(shí)踐

    圖像分割是計(jì)算機(jī)視覺(jué)中的一項(xiàng)關(guān)鍵任務(wù),其目標(biāo)是將圖像劃分為不同的有意義且可區(qū)分的區(qū)域或?qū)ο?。這是物體識(shí)別、跟蹤和檢測(cè)、醫(yī)學(xué)成像和機(jī)器人等各種應(yīng)用中的一項(xiàng)基本任務(wù)。 許多技術(shù)可用于圖像分割,從傳統(tǒng)方法到基于深度學(xué)習(xí)的方法。隨著深度學(xué)習(xí)的出現(xiàn),圖像

    2024年01月23日
    瀏覽(22)
  • 計(jì)算機(jī)視覺(jué)中的多樣性: 相似性度量的實(shí)踐與應(yīng)用

    計(jì)算機(jī)視覺(jué)(Computer Vision)是人工智能領(lǐng)域的一個(gè)重要分支,主要關(guān)注于從圖像和視頻中抽取和理解有意義的信息。在計(jì)算機(jī)視覺(jué)任務(wù)中,相似性度量是一個(gè)重要的概念,它用于衡量?jī)蓚€(gè)特征向量之間的相似程度。隨著計(jì)算機(jī)視覺(jué)技術(shù)的不斷發(fā)展,我們需要更加準(zhǔn)確、高效地衡

    2024年02月20日
    瀏覽(26)
  • 《零基礎(chǔ)實(shí)踐深度學(xué)習(xí)》(第2版)學(xué)習(xí)筆記,(五)深度學(xué)習(xí)與計(jì)算機(jī)視覺(jué)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包