主要UI(Android)

时间:2017-01-31 09:41:04

标签: android user-interface android-xml

问题

在我的一个应用程序中,我使用了一个Tutorial overaly view(TapTargetView),它在应用程序的第一次打开时向用户显示了一个很好的教程。 在大多数设备上,这种方法很好,除了一些用户,叠加层后面正常用户界面创建一个如下图所示的视图:
这里的手机是OnePlus 1,CyanogenOS 12.1(Lollipop)。

enter image description here

另一个教程覆盖库(ShowcaseView)也出现了这个问题。

代码

教程代码如下:

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-index,但由于它的Android和教程显示以后而不是主UI,我不知道如何解决它。

-

更新

Android Studio检查器显示的视图层次结构为: enter image description here

0 个答案:

没有答案