第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

如何設(shè)計(jì)如附圖所示的浮動(dòng)按鈕

如何設(shè)計(jì)如附圖所示的浮動(dòng)按鈕

holdtom 2024-01-05 14:42:14
我正在嘗試創(chuàng)建一個(gè)應(yīng)用程序,并且我已經(jīng)有一個(gè)圖像設(shè)計(jì),但我無(wú)法克隆選項(xiàng)卡上方按鈕的確切形狀我期望此圖中有相同的設(shè)計(jì):下注:0 和 0.00EGP 應(yīng)該是變量
查看完整描述

2 回答

?
素胚勾勒不出你

TA貢獻(xiàn)1827條經(jīng)驗(yàn) 獲得超9個(gè)贊

創(chuàng)建一個(gè) XML 文件bottom_corner.xml作為背景


<?xml version="1.0" encoding="UTF-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android">

    <solid android:color="#0091fa"/>

    <stroke android:width="1dp"

        android:color="#0091fa" />


    <corners android:radius="10dp"/>

    <padding android:left="0dp"

        android:top="0dp"

        android:right="0dp"

        android:bottom="0dp" />

</shape>

現(xiàn)在創(chuàng)建布局floated_button.xml并在布局中使用此背景:


<RelativeLayout android:layout_width="match_parent"

    android:layout_height="60dp"

    android:layout_marginRight="10dp"

    android:layout_marginLeft="10dp"

    android:layout_marginBottom="5dp"

    android:background="@drawable/bottom_corner"

    xmlns:android="http://schemas.android.com/apk/res/android">


    <TextView

        android:id="@+id/tv_total_value"

        android:layout_width="50dp"

        android:layout_height="wrap_content"

        android:text="0"

        android:textSize="18dp"

        android:gravity="center"

        android:layout_centerVertical="true"

        android:textColor="#fff"/>


    <TextView

        android:id="@+id/tv_egp_value"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:text="0.00 EGP"

        android:textSize="22dp"

        android:gravity="center"

        android:paddingRight="15dp"

        android:layout_alignParentRight="true"

        android:layout_centerVertical="true"

        android:textColor="#fff"/>



    <View

        android:layout_width="1dp"

        android:layout_height="match_parent"

        android:background="#fff"

        android:layout_toRightOf="@+id/tv_total_value"/>


    <TextView

        android:id="@+id/tv_title"

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:text="Charge"

        android:textSize="22dp"

        android:gravity="center"

        android:paddingRight="15dp"

        android:paddingLeft="15dp"

        android:layout_centerVertical="true"

        android:layout_toRightOf="@+id/tv_total_value"

        android:textColor="#fff"/>


</RelativeLayout>


查看完整回答
反對(duì) 回復(fù) 2024-01-05
?
ABOUTYOU

TA貢獻(xiàn)1812條經(jīng)驗(yàn) 獲得超5個(gè)贊

對(duì)于您的具體問(wèn)題,您可以像這樣繼續(xù):


首先,你必須創(chuàng)建一個(gè)drawable file圓形背景。


<?xml version="1.0" encoding="utf-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android"

? ? android:shape="rectangle">

? ? <solid android:color="#000000" />

? ? <corners android:radius="15dp" />

</shape>

然后,您可以添加tag of image并將其放置在圖像的一角上您想要放置的位置。然后使用drawable asbackground然后調(diào)整一下就可以TextView了。


<ImageView

? ? android:id="@+id/ivLauncher"

? ? android:layout_width="wrap_content"

? ? android:layout_height="wrap_content"

? ? android:layout_margin="10dp"

? ? android:src="@mipmap/ic_launcher"

? ? app:layout_constraintLeft_toLeftOf="parent"

? ? app:layout_constraintTop_toTopOf="parent" />


<ImageView

? ? android:id="@+id/ivBg"

? ? android:layout_width="15dp"

? ? android:layout_height="15dp"

? ? android:src="@drawable/round_text_bg"

? ? app:layout_constraintTop_toBottomOf="@id/ivLauncher"

? ? app:layout_constraintBottom_toBottomOf="@id/ivLauncher"

? ? app:layout_constraintLeft_toRightOf="@id/ivLauncher"

? ? app:layout_constraintRight_toRightOf="@id/ivLauncher"/>


<TextView

? ? android:layout_width="wrap_content"

? ? android:layout_height="wrap_content"

? ? android:text="1"

? ? android:textColor="#FFFFFF"

? ? android:textSize="10dp"

? ? app:layout_constraintTop_toTopOf="@id/ivBg"

? ? app:layout_constraintBottom_toBottomOf="@id/ivBg"

? ? app:layout_constraintLeft_toLeftOf="@id/ivBg"

? ? app:layout_constraintRight_toRightOf="@id/ivBg"/>


查看完整回答
反對(duì) 回復(fù) 2024-01-05
  • 2 回答
  • 0 關(guān)注
  • 171 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)