內(nèi)蒙古網(wǎng)站建設(shè)公司成都創(chuàng)新互聯(lián),內(nèi)蒙古網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為內(nèi)蒙古上千多家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\外貿(mào)網(wǎng)站制作要多少錢,請找那個(gè)售后服務(wù)好的內(nèi)蒙古做網(wǎng)站的公司定做!
View toastRoot = getLayoutInflater().inflate(R.layout.toast, null);
TextView message = (TextView) toastRoot.findViewById(R.id.message);
message.setText("My Toast");
Toast toastStart = new Toast(this);
toastStart.setGravity(Gravity.BOTTOM, 0, 10);
toastStart.setDuration(Toast.LENGTH_LONG);
toastStart.setView(toastRoot);
toastStart.show();
toast.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/toast_frame"
>
<TextView
android:id="@+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAppearance="@style/TextAppearance.Small"
android:textColor="@color/bright_foreground_dark"
android:shadowColor="#BB000000"
android:shadowRadius="2.75"
/>
</LinearLayout>
當(dāng)前題目:自定義Toast
本文網(wǎng)址:http://chinadenli.net/article28/jggpjp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供外貿(mào)建站、服務(wù)器托管、網(wǎng)站導(dǎo)航、標(biāo)簽優(yōu)化、手機(jī)網(wǎng)站建設(shè)、移動網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)