Reputation: 303
I am developing an android app in which i want to create an overlay screen on first time application start only.I am using a fragment as home screen on app start. I want to do it manually not by showcase library..
Upvotes: 0
Views: 2979
Reputation: 2806
Use one of these libraries:
Example for showcaseView:
Button closeButton = new Button(this);
closeButton.setBackgroundColor(200);
closeButton.setEnabled(false);
showcaseView = new ShowcaseView.Builder(this)
.setTarget(new PointTarget(330, 570))
// .setTarget(new ViewTarget(((Toolbar) findViewById(R.id.toolbar)).getChildAt(0)))//works
.setContentTitle("Add a new device")
.setContentText("You need to add a new device to be able to use this app")
// .hideOnTouchOutside()
.setStyle(R.style.CustomShowcaseTheme2)
.replaceEndButton(closeButton)
.build();
Upvotes: 3
Reputation: 3134
If i follow your question than, You should use a RelativeLayout
as overlay. and set visibility according to your need.
<RelativeLayout
android:width="match_parent"
android:height="match_parent">
<LinearLayout>
// your main layout goes here
<LinearLayout>
<RelativeLayout
android:id="@+id/overlay"
android:width="match_parent"
android:height="match_parent">
</RelativeLayout>
</RelativeLayout>
Upvotes: 1