我使用https://github.com/amlcurran/ShowcaseView庫創建了展示視圖。默認情況下,展示視圖圓圈指向元素的中心。 如何更改android showcaseview圓圈位置?
我想這個圈子移動到的TextView的開始
請幫我
更新
我的佈局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.bm.eg.activities.CreateProfileActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/toolbar_transparent" />
<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="40dp"
android:layout_marginRight="40dp"
android:layout_marginTop="8dp"
android:ellipsize="end"
android:hint="@string/hint_title"
android:singleLine="true"
android:textColor="@android:color/white"
android:textColorHint="@color/white_transparency_50"
android:textSize="24sp" />
在活動
mTVTitle = (TextView) findViewById(R.id.tv_title);
mShowcaseView = new ShowcaseView.Builder(this)
.setTarget(new ViewTarget(mTVTitle))
.setContentTitle(getString(R.string.sv_create_profile_title))
.setContentText(getString(R.string.sv_create_profile_title_description))
.setStyle(R.style.CustomShowcaseTheme2)
.blockAllTouches()
.replaceEndButton(R.layout.showcase_view_cusom_button)
.build();
你如何設置'.setTarget(新ActionViewTarget(這一點,ActionViewTarget.Type.HOME))' –
mTVTitle =(TextView的)findViewById(R.id.tv_title)?; .setTarget(new ViewTarget(mTVTitle)) –