Overlay appears on the main interface (Android).

Problem

In one of my applications, I use the Tales overaly review ( TapTargetView ), which when you first open the application shows a nice tutorial for the user. On most devices, this works great, with the exception of some users, the overlay behind the regular user interface that creates the view, as shown in the following image: The
phone here is OnePlus 1, CyanogenOS 12.1 (Lollipop).

enter image description here

The problem also arose with another textbook cover library ( ShowcaseView ).

the code

The tutorial code is as follows:

TapTargetSequence intro = new TapTargetSequence(this)
                    .targets(
                            TapTarget.forView(findViewById(R.id.btnSearchEverything), "Search all", "Search for Spells, Items and other content here.")
                                    // All options below are optional
                                    .outerCircleColor(R.color.selectedred)      
                                    .targetCircleColor(R.color.lightgreen)   
                                    .titleTextSize(20)                 
                                    .titleTextColor(R.color.styletext)
                                    .descriptionTextSize(14) 
                                    .descriptionTextColor(R.color.styletext) 
                                    .textColor(R.color.styletext)  
                                    .cancelable(true) 
                                    .tintTarget(false)
                                    .transparentTarget(true)
                                    .targetRadius(60),
                            TapTarget.forView(findViewById(R.id.btnForum), "Share content", "Share and import content from our forums.")
                                    .outerCircleColor(R.color.selectedred)     
                                    .targetCircleColor(R.color.lightgreen)  
                                    .titleTextSize(20)
                                    .titleTextColor(R.color.styletext)
                                    .descriptionTextSize(14)
                                    .descriptionTextColor(R.color.styletext)
                                    .textColor(R.color.styletext)       
                                    .cancelable(true)
                                    .transparentTarget(true) 
                                    .targetRadius(120), 
                            TapTarget.forView(findViewById(R.id.btnCreator), "Content Creator", "With the online content tools you can easily add your own homebrew content.")

                                    .outerCircleColor(R.color.selectedred)     
                                    .targetCircleColor(R.color.lightgreen)   
                                    .targetRadius(120));
            intro.start();

XML- ( , , ).

<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context=".StartschermActivity"
    android:id="@+id/scrollView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

 <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >

     <TextView
         android:id="@+id/textView1"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginLeft="10dp"
         android:layout_marginRight="10dp"
         android:layout_marginTop="5dp"
         android:text="@string/welkom" />


 </LinearLayout>
</ScrollView>

- , , , , . HTML, , z- -, Android , , , .

-

Update

hiearchy, Android Studio: enter image description here

+4

Source: https://habr.com/ru/post/1668367/


All Articles