Coder Social home page Coder Social logo

materialintroview's People

Contributors

badoualy avatar bryant1410 avatar filol avatar iammert avatar muratcanbur avatar pierfrancescosoffritti avatar thomaskioko avatar yucombinator 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  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

materialintroview's Issues

Set width of dialog ?

Is it possible to set width of dialog? I want to prevent dialog from taking whole width of the screen. I am using it in an application for tablet and information with only few words .

better rtl support

for better rtl support please use start and end instead of left and right in material_intro_card.xml

Crash Android 7 only: NullPointerException View.getLocationInWindow(int[])

Hi Mert,

Awesome library! Have started seeing crashlogs coming in that relate to the library and only in Android 7.x

Below is the crash log, and the code I am using to configure the library. I am calling the tour after the activity has fully loaded (outside of onCreate). Do you have any suggestions?

Crash log
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.getLocationInWindow(int[])' on a null object reference at co.mobiwise.materialintro.target.ViewTarget.getPoint(ViewTarget.java:22) at co.mobiwise.materialintro.shape.Circle.getFocusPoint(Circle.java:60) at co.mobiwise.materialintro.shape.Circle.<init>(Circle.java:40) at co.mobiwise.materialintro.view.MaterialIntroView$Builder.build(MaterialIntroView.java:714) at co.mobiwise.materialintro.view.MaterialIntroView$Builder.show(MaterialIntroView.java:724) at mobi.jukestar.jukestarhost.PartyActivity.showIntro(PartyActivity.java:515) at mobi.jukestar.jukestarhost.PartyActivity.firstTimeTour(PartyActivity.java:507) at mobi.jukestar.jukestarhost.PartyActivity$6.onInitialized(PartyActivity.java:410) at com.spotify.sdk.android.player.Player$2.run(Player.java:400) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

Library config

public void showIntro(View view, String id, String text, FocusGravity focusGravity, Boolean continuing) {
        int delay = 750;
        if (continuing) {delay = 250;}

        new MaterialIntroView.Builder(PartyActivity.this)
                .enableDotAnimation(false)
                .setFocusGravity(focusGravity)
                .setFocusType(Focus.NORMAL)
                .setDelayMillis(delay)
                .setTargetPadding(10)
                .enableFadeAnimation(true)
                .performClick(false) //True means the underlying button is also tapped
                .setInfoText(text)
                .setTarget(view)
                .setListener(this)
                .setUsageId(id)
                .show();
    }

Relative layout malfunction - Unexpected and awkward consequence of including the library

Hi,

I am quite perplexed at the following issue: I have a recycler view with a recyclerview that has rows that have relative layouts as their viewgroup. This relative layout doesn't seem to understand "left:right", "right:left" attributes after including your library. This is weird as I haven't seen anything in your code that could impede my layout and use the same libraries as you do. Please see the screenshots below:

Before inclusion:
before_inclusion

After inclusion:
after_inclusion

Do you have any idea what might be causing the issues? Or know how to solve it? :)

Thanks!

IllegalArgumentException: width and height must be > 0

hi! first of all, this is a great library! On some devices I'm getting a weird crash report. Here is everything i have:

Fatal Exception: java.lang.IllegalArgumentException: width and height must be > 0
   at android.graphics.Bitmap.createBitmap(Bitmap.java:933)
   at android.graphics.Bitmap.createBitmap(Bitmap.java:912)
   at android.graphics.Bitmap.createBitmap(Bitmap.java:879)
   at co.mobiwise.materialintro.view.MaterialIntroView.onDraw(MaterialIntroView.java:326)
   at android.view.View.draw(View.java:16180)
   at android.view.View.updateDisplayListIfDirty(View.java:15103)
   at android.view.View.getDisplayList(View.java:15126)
   at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3687)
   at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3666)
   at android.view.View.updateDisplayListIfDirty(View.java:15063)
   at android.view.View.getDisplayList(View.java:15126)
   at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:275)
   at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:281)
   at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:320)
   at android.view.ViewRootImpl.draw(ViewRootImpl.java:2753)
   at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2586)
   at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2178)
   at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1191)
   at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6645)
   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777)
   at android.view.Choreographer.doCallbacks(Choreographer.java:590)
   at android.view.Choreographer.doFrame(Choreographer.java:560)
   at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763)
   at android.os.Handler.handleCallback(Handler.java:739)
   at android.os.Handler.dispatchMessage(Handler.java:95)
   at android.os.Looper.loop(Looper.java:145)
   at android.app.ActivityThread.main(ActivityThread.java:5942)
   at java.lang.reflect.Method.invoke(Method.java)
   at java.lang.reflect.Method.invoke(Method.java:372)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

Hope you guys can help me.

click too fast

If I set to click on any site disappears, click too fast, show multiple instructions Dialog will appear

Gesture icons

Hi!
It's possible to replace the white circle by a gesture icon (like these below)?
gestures

failed to resolve dependency

compile 'com.github.iammert:MaterialIntroView:1.5.2' dependency

is failing to resolve despite adding jitpack.io in project gradle file

Trying use on Dialog

Hi,

First of all, thanks for nice library. I tried to use intro view on a dialog which I created but library fails to show intro on dialog. It shows on activity view and can be visible if I close the dialog.

Using dialog library is MaterialDialog. You can reach it from here: https://github.com/afollestad/material-dialogs

Suggestions?

Option to always display

It would be nice to have an option to always display the dialog in all cases (even if the id has already been used or no id)

Only show once?

public class ShowCaseTool {
    public static void pleaseIntoCategory(final Activity activity, final Context context,final View target){
        new MaterialIntroView.Builder(activity)
                .enableDotAnimation(false)
                .setFocusGravity(FocusGravity.CENTER)
                .setFocusType(Focus.NORMAL)
                .setDelayMillis(200)
                .enableFadeAnimation(false)
                .performClick(true)
                .setInfoText(context.getString(R.string.pleaseIntoCategory))
                .setTarget(target)
                .setUsageId("pleaseIntoCategory_1")
                .show();
    }
    public static void pleaseCreateACategory(final Activity activity, final Context context,final View target){
        new MaterialIntroView.Builder(activity)
                .enableDotAnimation(false)
                .setFocusGravity(FocusGravity.CENTER)
                .setFocusType(Focus.NORMAL)
                .setDelayMillis(200)
                .enableFadeAnimation(false)
                .performClick(true)
                .setInfoText(context.getString(R.string.pleaseCreateACategory))
                .setTarget(target)
                .setUsageId("pleaseCreateACategory_3")
                .show();
    }
    public static void pleaseTakePicture(final Activity activity, final Context context,final View target){
        new MaterialIntroView.Builder(activity)
                .enableDotAnimation(false)
                .setFocusGravity(FocusGravity.CENTER)
                .setFocusType(Focus.NORMAL)
                .setDelayMillis(1000)
                .enableFadeAnimation(false)
                .performClick(true)
                .setInfoText(context.getString(R.string.pleaseTakePicture))
                .setTarget(target)
                .setUsageId("pleaseTakePicture_2")
                .show();
    }
}

First I use pleaseTakePicture() and pleaseCreateACategory() and pleaseIntoCategory() in A fragment and transation to B Fragment (right slide)both two exist in one viewpager.
Second,I reEnter A fragment (left slide) It can't show MaterialIntroView twice.

IntroView appears even if view is out of focus

Here's what you can do to regenerate the issue:

  1. Set setDelayMillis() to a high value say 9000
  2. Immediately open a fragment (different to the one carrying MaterialIntroView) (and in same parent activity)

This should disable the intro view from appearing but instead it appears ignoring the fragment on which it was initialized.

proguard configuration

thanks for your great library !

can you post proguard configuration please ?

i give this warning now :

Warning:co.mobiwise.materialintro.view.MaterialIntroView$$Lambda$1: can't find referenced class java.lang.invoke.LambdaForm$Hidden Warning:co.mobiwise.materialintro.view.MaterialIntroView$$Lambda$2: can't find referenced class java.lang.invoke.LambdaForm$Hidden Warning:co.mobiwise.materialintro.view.MaterialIntroView$$Lambda$3: can't find referenced class java.lang.invoke.LambdaForm$Hidden Warning:co.mobiwise.materialintro.view.MaterialIntroView$1$$Lambda$1: can't find referenced class java.lang.invoke.LambdaForm$Hidden Warning:co.mobiwise.materialintro.view.MaterialIntroView$1$$Lambda$4: can't find referenced class java.lang.invoke.LambdaForm$Hidden

Fatal Exception: java.lang.IllegalArgumentException width and height must be > 0

Hi,

I'm getting this exception when running on my LG Nexus 5 with 6.0.1 API 23:

Fatal Exception: java.lang.IllegalArgumentException: width and height must be > 0
at android.graphics.Bitmap.createBitmap(Bitmap.java:829)
at android.graphics.Bitmap.createBitmap(Bitmap.java:808)
at android.graphics.Bitmap.createBitmap(Bitmap.java:775)
at co.mobiwise.materialintro.view.MaterialIntroView.onDraw(MaterialIntroView.java:314)
at android.view.View.draw(View.java:16184)
at android.view.View.updateDisplayListIfDirty(View.java:15180)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
at android.view.View.updateDisplayListIfDirty(View.java:15140)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:281)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:287)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:322)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2615)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2434)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2067)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
at android.view.Choreographer.doCallbacks(Choreographer.java:670)
at android.view.Choreographer.doFrame(Choreographer.java:606)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Fatal Exception: java.lang.OutOfMemoryError

MaterialIntroView line 269 co.mobiwise.materialintro.view.MaterialIntroView.init

Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 4901808 byte allocation with 2891992 free bytes and 2MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(VMRuntime.java)
at android.graphics.BitmapFactory.nativeDecodeAsset(BitmapFactory.java)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:726)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:547)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1014)
at android.content.res.Resources.loadDrawableForCookie(Resources.java:3723)
at android.content.res.Resources.loadDrawable(Resources.java:3596)
at android.content.res.TypedArray.getDrawable(TypedArray.java:750)
at android.widget.ImageView.(ImageView.java:151)
at android.widget.ImageView.(ImageView.java:140)
at android.support.v7.widget.AppCompatImageView.(SourceFile:57)
at android.support.v7.widget.AppCompatImageView.(SourceFile:53)
at android.support.v7.app.AppCompatViewInflater.createView(SourceFile:106)
at android.support.v7.app.AppCompatDelegateImplV7.createView(SourceFile:972)
at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(SourceFile:1031)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(SourceFile:44)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:732)
at android.view.LayoutInflater.inflate(LayoutInflater.java:483)
at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
at co.mobiwise.materialintro.view.MaterialIntroView.init(SourceFile:269)
at co.mobiwise.materialintro.view.MaterialIntroView.(SourceFile:208)
at co.mobiwise.materialintro.view.MaterialIntroView$Builder.(SourceFile:624)
at jankstudio.com.mixtapes.util.AppMethods.showIntro(SourceFile:351)
at jankstudio.com.mixtapes.view.MusicPlayerActivity.onCreate(SourceFile:211)
at android.app.Activity.performCreate(Activity.java:6221)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2614)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.access$900(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5835)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

How To Skip The MaterialIntroView

Is there any option so that I can skip the whole MaterialIntroView let suppose user did not want to see the intro he want to skip ?

Add Jitpack repository and dependency

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}
dependencies {
    ...
    compile 'com.github.iammert:MaterialIntroView:-SNAPSHOT'
}

BTW, using a release is better than using SNAPSHOT as the version.

Reset views?

A quick look at code did reveal that there's a way to reset preferences but I am not sure if there exists any such method? How do I reset the tips view, as in let's say I want to show it more than once.

Oh and this is by far the most useful library for showing helpful tips. Kudos 👍

Manifest merger failed for atribute application@label value

I'm gettings this error

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@label value=(@string/my_app_name) from AndroidManifest.xml:14:9-51
    is also present at [com.github.iammert:MaterialIntroView:1.5.2] AndroidManifest.xml:13:9-41 value=(@string/app_name).
    Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:10:5-62:19 to override.

My manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="mypackage">

    <application
        android:allowBackup="true"
        android:name=".MyApplication"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/my_app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
    </application>
</manifest>

So many problems

Hi. first of all thank you for this beautiful library.
Here some of my problems :

  1. RTL is not supported and the icon doesn't show correctly.
  2. The text or message also not visible in RTL mode.
  3. It would be nice there was a button so user can perform some actions in showcase mode such as next or previous.
  4. The showcase only shows once even if I do not set unique id for preferences that is so annoying and every time I should manually reset preferences

Bug - RecyclerView

TnQ for this amazing lib.

i tried to show intro on items of a recyclerview with this code:

View introView = mRecyclerView.getChildAt(studentData.size()-1);

new MaterialIntroView.Builder(NewGradeActivity.this)
                                .setFocusGravity(FocusGravity.CENTER)
                                .setFocusType(Focus.MINIMUM)
                                ...
                                .setTarget(introView)
                                .show();

but there is a error:

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.getLocationInWindow(int[])' on a null object reference at co.mobiwise.materialintro.target.ViewTarget.getPoint(ViewTarget.java:22) at co.mobiwise.materialintro.shape.Circle.getFocusPoint(Circle.java:60) at co.mobiwise.materialintro.shape.Circle.<init>(Circle.java:40) at co.mobiwise.materialintro.view.MaterialIntroView$Builder.build(MaterialIntroView.java:688) at co.mobiwise.materialintro.view.MaterialIntroView$Builder.show(MaterialIntroView.java:698) at ir.uniquedev.okul.NewGradeActivity$5.onResponse(NewGradeActivity.java:274) at ir.uniquedev.okul.NewGradeActivity$5.onResponse(NewGradeActivity.java:247) at com.android.volley.toolbox.StringRequest.deliverResponse(StringRequest.java:67) at com.android.volley.toolbox.StringRequest.deliverResponse(StringRequest.java:30) at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5546) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:964) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)

How to set focus on hamburger icon?

I want to set focus on the hamburger icon like you've shown in the image(shown below).

art_drawer

But it's not possible since i can't get a view reference of the icon. I'm using the following code:

DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle( this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close); drawer.setDrawerListener(toggle); toggle.syncState();

Since the setTarget() method needs a view as a paramater, do i need to set up the hamburger icon on the toolbar in xml so that i can get a view reference from it or is there another way to do it?

enableIcon method does not appear

It seem you forgot to upload the last changes to the Maven repository. The method appears into this Github repository but not if I import the project using Gradle. Could you upload the last version? I would like to import the project using Gradle instead of download it manually.

Thanks in advance!

Make show() / dismiss() public

Would be nice to programmatically dismiss the MaterialIntroView so could you make the dismiss function in MaterialIntroView.java public? This is already added to this PR #28 which includes the rectangle shapes (also useful :) )

内存泄露

存在很严重的内存泄露问题,当一个界面里show出来,不去点击,然后再退出打开,这样不停的show就会导致oom

dismissOnTouch(false) not working

I cannot seem to find any documentation on the dismissOnTouch(boolean) method, but it does not seem to behave as expected.

Expected Behaviour:
If a user clicks on the intro view, the view should not be dismissed when dismissOnTouch is set to false

Actual Behaviour:
The View is dismissed

Give focus to the drawer view

I am trying to give the focus to the drawer view, just like at the first screenshot that you have at the "Demos" set of images.
There is no example like that in the sample project. How did you accomplish that?

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.