Giter Club home page Giter Club logo

toastcompat's People

Contributors

drakeet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

toastcompat's Issues

Nubia NX595j

ToastCompat.makeText(context, context.getText(textId), ToastCompat.LENGTH_LONG).show()无效,不显示提示;
原生Toast.makeText(context, context.getText(textId), ToastCompat.LENGTH_LONG).show()正常显示;

Is Log.e better than Log.i ?

try { Log.d(TAG, "WindowManager's addView(view, params) has been hooked."); base.addView(view, params); } catch (BadTokenException e) { Log.i(TAG, e.getMessage()); if (badTokenListener != null) { badTokenListener.onBadTokenCaught(toast); } }
I found this in SafeToastContext.java , but is that Log.e better than Log.i ?
Not a big deal, but make me feel better.
Or you have other purposes about this? PLZ let me know, Thanks

Some device could not show Toast

Hi,
i use your library for my project, i think it is a good way to solve the problem.

but i test in the phone (NUBIA Z17S android7.1.1), it could not show the toast.
there is no any useful message for debug.
i think some system use the (xxx instanceof WindowManagerImpl) to avoid
any hack from outside of system.

Those solution has some bug in some device: It do not show the toast in some device.
if somebody have to use these solution,it should make sure these code just use in android7.1.1

sorry for my poor english.

toast不显示

你好在引入ToastCompat后今早在同事的手机上发现Toast不显示,手机型号如下
Redmi Note 3
MIUI 9.2
android 5.0.2

Toast#getView() was deprecated on Android 11 and it returns null

/**
 * Return the view.
 *
 * <p>Toasts constructed with {@link #Toast(Context)} that haven't called {@link #setView(View)}
 * with a non-{@code null} view will return {@code null} here.
 *
 * <p>Starting from Android {@link Build.VERSION_CODES#R}, in apps targeting API level {@link
 * Build.VERSION_CODES#R} or higher, toasts constructed with {@link #makeText(Context,
 * CharSequence, int)} or its variants will also return {@code null} here unless they had called
 * {@link #setView(View)} with a non-{@code null} view. If you want to be notified when the
 * toast is shown or hidden, use {@link #addCallback(Callback)}.
 *
 * @see #setView
 * @deprecated Custom toast views are deprecated. Apps can create a standard text toast with the
 *      {@link #makeText(Context, CharSequence, int)} method, or use a
 *      <a href="{@docRoot}reference/com/google/android/material/snackbar/Snackbar">Snackbar</a>
 *      when in the foreground. Starting from Android {@link Build.VERSION_CODES#R}, apps
 *      targeting API level {@link Build.VERSION_CODES#R} or higher that are in the background
 *      will not have custom toast views displayed.
 */
@Deprecated
@Nullable public View getView() {
    return mNextView;
}

How can we reproduce this bad token exception

I found this exception randomly while testing my app and I am using toasts on a lot of places, it turns out I am running the app on a device with api 25, and you library seems to be the way forward.

Is it possible to provide a code from which I could reproduce this issue?

Having "android.enableJetifier=false", the IDE says this library won't allow it

It says this:

Your project has set `android.useAndroidX=true`, but configuration `prodDebugRuntimeClasspath` still contains legacy support libraries, which may cause runtime issues.
This behavior will not be allowed in Android Gradle plugin 8.0.
Please use only AndroidX dependencies or set `android.enableJetifier=true` in the `gradle.properties` file to migrate your project to AndroidX (see https://developer.android.com/jetpack/androidx/migrate for more info).
The following legacy support libraries are detected:
prodDebugRuntimeClasspath -> me.drakeet.support:toastcompat:1.1.0 -> com.android.support:support-annotations:27.1.1

Please update the library so that we won't need this flag anymore.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.