精华内容
下载资源
问答
  • Android Toast

    2017-02-22 15:35:00
  • android Toast

    2011-11-08 14:55:00
    android Toast大全(五种情形)建立属于你自己的Toast Toast用于向用户显示一些帮助/提示。下面我做了5中效果,来说明Toast的强大,定义一个属于你自己的Toast。1.默认效果代码Toast.makeText(getApplicationContext...
    android Toast大全(五种情形)建立属于你自己的Toast
      Toast用于向用户显示一些帮助/提示。下面我做了5中效果,来说明Toast的强大,定义一个属于你自己的Toast。
    1.默认效果

    代码
    Toast.makeText(getApplicationContext(), "默认Toast样式",
    Toast.LENGTH_SHORT).show();

    2.自定义显示位置效果

    代码
    toast = Toast.makeText(getApplicationContext(),
    "自定义位置Toast", Toast.LENGTH_LONG);
    toast.setGravity(Gravity.CENTER, 0, 0);
    toast.show();

    3.带图片效果


    代码
    toast = Toast.makeText(getApplicationContext(),
    "带图片的Toast", Toast.LENGTH_LONG);
    toast.setGravity(Gravity.CENTER, 0, 0);
    LinearLayout toastView = (LinearLayout) toast.getView();
    ImageView imageCodeProject = new ImageView(getApplicationContext());
    imageCodeProject.setImageResource(R.drawable.icon);
    toastView.addView(imageCodeProject, 0);
    toast.show();

    4.完全自定义效果

    代码
    LayoutInflater inflater = getLayoutInflater();
    View layout = inflater.inflate(R.layout.custom,
    (ViewGroup) findViewById(R.id.llToast));
    ImageView image = (ImageView) layout
    .findViewById(R.id.tvImageToast);
    image.setImageResource(R.drawable.icon);
    TextView title = (TextView) layout.findViewById(R.id.tvTitleToast);
    title.setText("Attention");
    TextView text = (TextView) layout.findViewById(R.id.tvTextToast);
    text.setText("完全自定义Toast");
    toast = new Toast(getApplicationContext());
    toast.setGravity(Gravity.RIGHT | Gravity.TOP, 12, 40);
    toast.setDuration(Toast.LENGTH_LONG);
    toast.setView(layout);
    toast.show();

    5.其他线程

    代码
    new Thread(new Runnable() {
    public void run() {
    showToast();
    }
    }).start();


    完整代码
    1.Main,java
    package com.wjq.toast;
    import android.app.Activity;
    import android.os.Bundle;
    import android.os.Handler;
    import android.view.Gravity;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    import android.view.View.OnClickListener;
    import android.widget.ImageView;
    import android.widget.LinearLayout;
    import android.widget.TextView;
    import android.widget.Toast;
    public class Main extends Activity implements OnClickListener {
    Handler handler = new Handler();
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    findViewById(R.id.btnSimpleToast).setOnClickListener(this);
    findViewById(R.id.btnSimpleToastWithCustomPosition).setOnClickListener(
    this);
    findViewById(R.id.btnSimpleToastWithImage).setOnClickListener(this);
    findViewById(R.id.btnCustomToast).setOnClickListener(this);
    findViewById(R.id.btnRunToastFromOtherThread).setOnClickListener(this);
    }
    public void showToast() {
    handler.post(new Runnable() {
    @Override
    public void run() {
    Toast.makeText(getApplicationContext(), "我来自其他线程!",
    Toast.LENGTH_SHORT).show();
    }
    });
    }
    @Override
    public void onClick(View v) {
    Toast toast = null;
    switch (v.getId()) {
    case R.id.btnSimpleToast:
    Toast.makeText(getApplicationContext(), "默认Toast样式",
    Toast.LENGTH_SHORT).show();
    break;
    case R.id.btnSimpleToastWithCustomPosition:
    toast = Toast.makeText(getApplicationContext(),
    "自定义位置Toast", Toast.LENGTH_LONG);
    toast.setGravity(Gravity.CENTER, 0, 0);
    toast.show();
    break;
    case R.id.btnSimpleToastWithImage:
    toast = Toast.makeText(getApplicationContext(),
    "带图片的Toast", Toast.LENGTH_LONG);
    toast.setGravity(Gravity.CENTER, 0, 0);
    LinearLayout toastView = (LinearLayout) toast.getView();
    ImageView imageCodeProject = new ImageView(getApplicationContext());
    imageCodeProject.setImageResource(R.drawable.icon);
    toastView.addView(imageCodeProject, 0);
    toast.show();
    break;
    case R.id.btnCustomToast:
    LayoutInflater inflater = getLayoutInflater();
    View layout = inflater.inflate(R.layout.custom,
    (ViewGroup) findViewById(R.id.llToast));
    ImageView image = (ImageView) layout
    .findViewById(R.id.tvImageToast);
    image.setImageResource(R.drawable.icon);
    TextView title = (TextView) layout.findViewById(R.id.tvTitleToast);
    title.setText("Attention");
    TextView text = (TextView) layout.findViewById(R.id.tvTextToast);
    text.setText("完全自定义Toast");
    toast = new Toast(getApplicationContext());
    toast.setGravity(Gravity.RIGHT | Gravity.TOP, 12, 40);
    toast.setDuration(Toast.LENGTH_LONG);
    toast.setView(layout);
    toast.show();
    break;
    case R.id.btnRunToastFromOtherThread:
    new Thread(new Runnable() {
    public void run() {
    showToast();
    }
    }).start();
    break;
    }
    }
    }

    2.main,xml
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:padding="5dip" android:gravity="center">
    <Button android:layout_height="wrap_content"
    android:layout_width="fill_parent" android:id="@+id/btnSimpleToast"
    android:text="默认"></Button>
    <Button android:layout_height="wrap_content"
    android:layout_width="fill_parent" android:text="自定义显示位置"
    android:id="@+id/btnSimpleToastWithCustomPosition"></Button>
    <Button android:layout_height="wrap_content"
    android:layout_width="fill_parent" android:id="@+id/btnSimpleToastWithImage"
    android:text="带图片"></Button>
    <Button android:layout_height="wrap_content"
    android:layout_width="fill_parent" android:text="完全自定义"
    android:id="@+id/btnCustomToast"></Button>
    <Button android:layout_height="wrap_content"
    android:layout_width="fill_parent" android:text="其他线程"
    android:id="@+id/btnRunToastFromOtherThread"></Button>
    </LinearLayout>

    3.custom.xml
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_height="wrap_content" android:layout_width="wrap_content"
    android:background="#ffffffff" android:orientation="vertical"
    android:id="@+id/llToast" >
    <TextView
    android:layout_height="wrap_content"
    android:layout_margin="1dip"
    android:textColor="#ffffffff"
    android:layout_width="fill_parent"
    android:gravity="center"
    android:background="#bb000000"
    android:id="@+id/tvTitleToast" />
    <LinearLayout
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:id="@+id/llToastContent"
    android:layout_marginLeft="1dip"
    android:layout_marginRight="1dip"
    android:layout_marginBottom="1dip"
    android:layout_width="wrap_content"
    android:padding="15dip"
    android:background="#44000000" >
    <ImageView
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_width="wrap_content"
    android:id="@+id/tvImageToast" />
    <TextView
    android:layout_height="wrap_content"
    android:paddingRight="10dip"
    android:paddingLeft="10dip"
    android:layout_width="wrap_content"
    android:gravity="center"
    android:textColor="#ff000000"
    android:id="@+id/tvTextToast" />
    </LinearLayout>
    </LinearLayout>

    源码下载
    标签: Android2.2
    绿色通道:好文要顶关注我收藏该文与我联系
    永恒的记忆
    关注 - 4
    粉丝 - 138
    +加关注
    8 0
    (请您对文章做出评价)
    « 博主前一篇:通过创建一个位图的XY Chart来学习Android绘图类Rect,Paint,Bitmap,Canvas(附源码)
    » 博主后一篇:Android资源总结(开发工具/环境搭建/教程/论坛/博客/反编译工具)
    posted @ 2010-11-10 13:07 永恒的记忆 阅读(17147) 评论(10) 编辑 收藏

    http://www.cnblogs.com/salam/archive/2010/11/10/1873654.html
    编辑器加载中...

    转载于:https://www.cnblogs.com/meieiem/archive/2011/11/08/2241149.html

    展开全文
  • android toast_Android Toast

    2020-07-14 05:24:52
    android toastToast message is useful to show notification for ... In this tutorial, we’ll discuss and implement android Toast message example. Toast消息对在Android应用中显示少量通知非常有用。 在本教...

    android toast

    Toast message is useful to show notification for small time in android app. In this tutorial, we’ll discuss and implement android Toast message example.

    Toast消息对在Android应用中显示少量通知非常有用。 在本教程中,我们将讨论并实现android Toast消息示例。

    Android Toast (Android Toast)

    Android Toast is used to show notification for a particular interval of time at the bottom of the screen by default. Toast message doesn’t block the user interaction and auto disappears after a timeout. The android.widget.Toast class is the subclass of java.lang.Object class.

    默认情况下,Android Toast用于在屏幕底部显示特定时间间隔的通知。 Toast消息不会阻止用户交互,并且超时后自动消失。 android.widget.Toast类是java.lang.Object类的子类。

    创建基本的Toast消息 (Creating a Basic Toast message)

    Android Toast message is created using the method makeText() that is passed with the context, the message, and the duration as shown below:

    Android Toast消息是使用方法makeText()创建的,该方法随上下文,消息和持续时间一起传递,如下所示:

    Toast toast = Toast.makeText(context, "String goes here", duration);

    The context can be of the application or the activity. It’s recommended to use getApplicationContext() to let the Toast be displayed irrespective of the current state of the Activity.

    context可以是应用程序或活动的context 。 建议使用getApplicationContext()来显示Toast,而与Activity的当前状态无关。

    The duration can be set as Toast.LENGTH_SHORT or Toast.LENGTH_LONG.

    duration可以设置为Toast.LENGTH_SHORTToast.LENGTH_LONG

    The Toast is displayed using the method show().

    使用show()方法show() Toast。

    Toast.makeText(getApplicationContext(),"Basic Toast message", Toast.LENGTH_SHORT).show()

    定位您的吐司消息 (Positioning your Toast Message)

    A standard Toast message appears at the bottom of the screen. We can set our own gravity on a Toast as shown below

    屏幕底部显示一条标准的Toast消息。 我们可以在Toast上设置自己的重力,如下所示

    toast.setGravity(Gravity.CENTER_HORIZONTAL|Gravity.CENTER_VERTICAL, 0, 0);

    The second and third parameters are used to shift the toast to the right and down respectively by the offset specified.

    第二个参数和第三个参数用于将烤面包分别向右和向下移动指定的偏移量。

    Toast Android的自定义布局 (Custom Layout for Toast Android)

    To create a custom layout we can define the view layout in the XML lets say custom_toast.xml

    要创建自定义布局,我们可以在XML中定义视图布局,比如说custom_toast.xml

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="https://schemas.android.com/apk/res/android"
        android:id="@+id/custom_toast_container"
        android:orientation="horizontal"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:padding="8dp"
        android:background="#7DA1BC"
        >
        <ImageView android:src="@android:drawable/stat_notify_error"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="8dp"
            />
        <TextView android:id="@+id/text"
            android:layout_width="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_height="wrap_content"
            android:textColor="#FFF"
            />
    </LinearLayout>

    In our activity class, we’ll inflate the above layout and set it on the Toast using the method setView().

    在我们的活动类中,我们将膨胀以上布局,并使用setView()方法在Toast上进行设置。

    LayoutInflater inflater = getLayoutInflater();
    View layout = inflater.inflate(R.layout.custom_toast,
            (ViewGroup) findViewById(R.id.custom_toast_container));
    
    TextView text = layout.findViewById(R.id.text);
    text.setText("This is a custom toast");
    
    toast = new Toast(getApplicationContext());
    toast.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL, 0, 0);
    toast.setDuration(Toast.LENGTH_LONG);
    toast.setView(layout);
    toast.show();

    Let’s create an application in which each button would display a different type of Toast message, amongst the ones we’ve just discussed.

    让我们创建一个应用程序,其中每个按钮将显示刚刚讨论过的Toast消息的不同类型。

    Android Toast消息示例项目结构 (Android Toast Message Example Project Structure)

    Android Toast消息代码 (Android Toast Message Code)

    The code for the activity_main.xml layout is given below.

    下面给出了activity_main.xml布局的代码。

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="https://schemas.android.com/apk/res/android"
        xmlns:tools="https://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:layout_gravity="center"
        android:gravity="center"
        tools:context="com.journaldev.toasts.MainActivity">
    
        <Button
            android:id="@+id/btnBasicToast"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Basic Toast"/>
    
        <Button
            android:id="@+id/btnGravityToast"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Basic Toast With Gravity"/>
    
        <Button
            android:id="@+id/btnOffsetToast"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Basic Toast With Gravity And Offset"/>
    
        <Button
            android:id="@+id/btnCustomToast"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Custom Toast"/>
    
    </LinearLayout>

    The code for the MainActivity.java is given below

    MainActivity.java的代码如下

    package com.journaldev.toasts;
    
    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.view.Gravity;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.Button;
    import android.widget.TextView;
    import android.widget.Toast;
    
    public class MainActivity extends AppCompatActivity implements View.OnClickListener {
    
        Button btnToast, btnGravityToast, btnOffsetToast, btnCustomToast;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
    
            btnToast = findViewById(R.id.btnBasicToast);
            btnGravityToast = findViewById(R.id.btnGravityToast);
            btnOffsetToast = findViewById(R.id.btnOffsetToast);
            btnCustomToast = findViewById(R.id.btnCustomToast);
            btnToast.setOnClickListener(this);
            btnGravityToast.setOnClickListener(this);
            btnOffsetToast.setOnClickListener(this);
            btnCustomToast.setOnClickListener(this);
        }
    
        @Override
        public void onClick(View view) {
            switch (view.getId()) {
                case R.id.btnBasicToast:
                    Toast.makeText(getApplicationContext(), "Basic Toast", Toast.LENGTH_SHORT).show();
                    break;
                case R.id.btnGravityToast:
                    Toast toast = Toast.makeText(getApplicationContext(), "Toast with Gravity", Toast.LENGTH_SHORT);
                    toast.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL, 0, 0);
                    toast.show();
                    break;
                case R.id.btnOffsetToast:
                    toast = Toast.makeText(getApplicationContext(), "Toast With Offset", Toast.LENGTH_SHORT);
                    toast.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL, 50, 50);
                    toast.show();
                    break;
                case R.id.btnCustomToast:
                    LayoutInflater inflater = getLayoutInflater();
                    View layout = inflater.inflate(R.layout.custom_toast,
                            (ViewGroup) findViewById(R.id.custom_toast_container));
    
                    TextView text = layout.findViewById(R.id.text);
                    text.setText("This is a custom toast");
    
                    toast = new Toast(getApplicationContext());
                    toast.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL, 0, 0);
                    toast.setDuration(Toast.LENGTH_LONG);
                    toast.setView(layout);
                    toast.show();
                    break;
            }
        }
    }

    The output of the android toast example application in action is given below.

    android-toasts-output

    运行中的android Toast示例应用程序的输出如下。

    Did you notice the position change between the Gravity Toast and the one with Offset included?

    您是否注意到重力吐司和带有偏移量的吐司之间的位置变化?

    This brings an end to toast android tutorial. You can download the final Android Toast Example Project from the link below.

    这结束了吐司android教程。 您可以从下面的链接下载最终的Android Toast示例项目

    Reference: Official Doc.

    参考: 官方文件

    翻译自: https://www.journaldev.com/15867/android-toast

    android toast

    展开全文
  • Android Toast提示封装 Android中经常用到Toast提示,项目中很多Toast提示,写很长的一行,简单的封装一下,将Toast方法提出来,很方便使用: 实例代码: /** * 提示字符串 * short Toast * @param context * ...
  • React Native Toast 一个用于android和ios类似于android toast提示控件,android使用原生toast, ios使用UIView Toast
  • Android Toast,即便关闭了通知权限也会正常显示
  • android Toast对象的使用 自定义Toast
  • 自定义Android Toast

    千次阅读 2017-05-15 21:29:40
    Android Toast在开发中经常使用,多用于向用户展示提示信息,只不过系统的Toast有些太单调了,不够美观,下面介绍一种超简单的自定义Toast的方式: 在介绍自定义Toast之前,和大家一起看几行系统Toast的源码: ...


    Android Toast在开发中经常使用,多用于向用户展示提示信息,只不过系统的Toast有些太单调了,不够美观,下面介绍一种超简单的自定义Toast的方式:

    在介绍自定义Toast之前,和大家一起看几行系统Toast的源码:

    public static Toast makeText(Context context, CharSequence text, @Duration int duration){
            Toast result = new Toast(context);
    
            LayoutInflater inflate = (LayoutInflater)
                    context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            View v = inflate.inflate(com.android.internal.R.layout.transient_notification, null);
            TextView tv = (TextView)v.findViewById(com.android.internal.R.id.message);
            tv.setText(text);
            
            result.mNextView = v;
            result.mDuration = duration;
    
            return result;
    }
    这是系统Toast的mekeText()方法,大家天天都在用,源码很简单:new 一个Toast对象,加载一个布局页面(一个简单的TextView),把要显示的内容设置到TextView上,方法返回该Toast对象。[就这么简单]
    我们自定义Toast其实只想改变Toast的UI,让它更美观一些,甚至加一些我们的东西进去(图标之类的),核心代码就是makeText方法,通过修改这个方法完全可以随心所欲的定义我们的Toast。

    下面说一下我自定义Toast的思路:

    1.创建一个类Toast(类名与系统相同是为了我们的书写习惯考虑)

    2.定义makeText方法(定义与系统相同的makeText方法,核心是换成我们自定义的布局)

    就是这么简单!看完代码就明白了…

    public class Toast {
        public @interface Duration {
        }
    
        /**
         * Show the view or text notification for a short period of time.  This time
         * could be user-definable.  This is the default.
         */
        public static final int LENGTH_SHORT = 0;
    
        /**
         * Show the view or text notification for a long period of time.  This time
         * could be user-definable.
         */
        public static final int LENGTH_LONG = 1;
    
        private Toast() {
        }
    
        /**
         * Make a standard toast that just contains a text view.
         *
         * @param context  The context to use.  Usually your {@link android.app.Application}
         *                 or {@link android.app.Activity} object.
         * @param text     The text to show.  Can be formatted text.
         * @param duration How long to display the message.  Either {@link #LENGTH_SHORT} or
         *                 {@link #LENGTH_LONG}
         */
        public static android.widget.Toast makeText(Context context, CharSequence text, @Duration int duration) {
            android.widget.Toast result = new android.widget.Toast(context);
    
            LayoutInflater inflate = (LayoutInflater)
                    context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            View v = inflate.inflate(R.layout.transient_notification, null);
            TextView tv = (TextView) v.findViewById(R.id.message);
            tv.setText(text);
            result.setView(v);
            result.setDuration(duration);
    
            return result;
        }
    
        /**
         * Make a standard toast that just contains a text view with the text from a resource.
         *
         * @param context  The context to use.  Usually your {@link android.app.Application}
         *                 or {@link android.app.Activity} object.
         * @param resId    The resource id of the string resource to use.  Can be formatted text.
         * @param duration How long to display the message.  Either {@link #LENGTH_SHORT} or
         *                 {@link #LENGTH_LONG}
         * @throws Resources.NotFoundException if the resource can't be found.
         */
        public static android.widget.Toast makeText(Context context, @StringRes int resId, @Duration int duration)
                throws Resources.NotFoundException {
            return makeText(context, context.getResources().getText(resId), duration);
        }
    
    }
    核心是makeText(Context context, CharSequence text, @Duration int duration)方法,仍然是创建系统Toast,关键点是加载我们自己的transient_notification.xml布局文件,细心的朋友可能还会看到:处理根布局View和duration两个变量,我们分别使用系统Toast提供的setView和setDuration两个public方法。
    transient_notification.xml

    <LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:drawable/toast_frame"
        android:gravity="center"
        android:orientation="vertical">
    
        <TextView
            android:id="@+id/message"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:drawableLeft="@mipmap/qq"
            android:drawableRight="@mipmap/qq"
            android:shadowColor="#BB000000"
            android:shadowRadius="2.75"
            android:textAppearance="@style/TextAppearance.Toast"
            android:textColor="#1bb5d7"/>
    
    </LinearLayout>
    需要什么样式的Toast,就定义自己的transient_notification.xml布局就可以,显示图片还是文字完全由你掌控!
    我们的Toast定义完了,怎么用呢?

    Toast.makeText(MainActivity.this, "自定义toast", Toast.LENGTH_LONG).show();
    看到这行代码有没有很亲切!没错,我们的自定义Toast就是这么用的!

    只有一点不同,不要再导入系统的Toast类了,用自己定义的,连包都不需要导入了!

    import android.widget.Toast;//删掉这句,无需导包

    .apk安装包下载


    Demo源码下载

    展开全文
  • Android Toast提示封装Android中经常用到Toast提示,项目中很多Toast提示,写很长的一行,简单的封装一下,将Toast方法提出来,很方便使用:实例代码:/*** 提示字符串* short Toast* @param context* @param text* ...
  • Android Toast的基本使用

    2020-06-28 16:23:38
    Android Toast的基本使用 一、 说明 本文主要讲一下Android Toast的基本使用。 二、 所用工具 Android Studio 三、 具体内容 Toast: 主要用来提示信息 语法: Toast.makeText(当前上下文, “要提示的内容”, 显示的...
  • delphi android Toast

    千次阅读 2014-11-23 20:05:09
    功能:Android Toast提示消息框
  • Android Toast 居中 可以设置 字体大小 Toast toast = Toast.makeText(this, "这是一个简单的自定义Toast", Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER, 0, 0); //居中显示 LinearLayout ...
  • Toast 我想我们应该使用的都很多,一般我们使用默认设置较多,但是默认设置往往不能满足我们的需求,那我们现在来自定义下:默认Toast:Toast.makeText(MainActivity.this,"点击按钮",Toast.LENGTH_SHORT).show();...
  • Android Toast的时长

    2021-02-05 14:21:14
    结论:Android Toast的时长 Toast.LENGTH_LONG 3500ms Toast.LENGTH_SHORT 2000ms 今天公司一实习生问我Toast的时间,我说Long 3500ms,Short 2000ms 他问:Toast不是提供了setDuration(@Duration int ...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 12,330
精华内容 4,932
热门标签
关键字:

androidtoast