Closed nicolabeghin closed 7 years ago
I'm having this issue too. Setting the ClipToBounds option works to show it above the ActionBar view, but then, of course, it doesn't have room to show text or anything.
I have been unable to replicate this. What android version and support library version are you using? Also how are you creating the prompt and finding the view that is the target?
With this information I should be able to investigate further.
hi @sjwall
below the content of build.gradle
dependencies {
compile project(':aFileChooser')
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support:support-v4:25.4.0'
compile 'com.android.support:design:25.4.0'
compile 'de.mindpipe.android:android-logging-log4j:1.0.3'
compile 'uk.co.samuelwall:material-tap-target-prompt:1.10.0'
compile 'com.github.apl-devs:appintro:v4.2.0'
compile 'log4j:log4j:1.2.17'
}
I'm using android.support.v7.app.AppCompatActivity
and binding the library on a MenuItem
:
if (settings.getBoolean("highlightedContactMe", false) == false) {
new MaterialTapTargetPrompt.Builder(MainActivity.this)
.setTarget(R.id.itemContact)
.setPrimaryText("I'm here to help!")
.setSecondaryText("Just drop me a line")
.setBackgroundColourFromRes(R.color.colorPrimary)
.setOnHidePromptListener(new MaterialTapTargetPrompt.OnHidePromptListener() {
@Override
public void onHidePrompt(MotionEvent event, boolean tappedTarget) {
}
@Override
public void onHidePromptComplete() {
SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).edit();
editor.putBoolean("highlightedContactMe", true);
editor.apply();
}
})
.show();
}
thanks nicola
I can replicate the issue now and am working on a fix for it
Thanks a lot @sjwall!
I am still working on a fix for this but have found a workaround in the mean time. Set the decor view as the view that the prompt is clipped to:
builder.setClipToView(getWindow().getDecorView());
I have a fix, just need to test it further and fix some other issues with targeting the navigation and overflow items in the app bar when it is in the decor view.
This has been fixed and released in v1.12.1
Hi I am getting the issue , that even the action bar is not there, it leaving the space above and occupying total space on the top.
Try this it worked for me
setClipToView(null)
Hi Is this library compatible with Toolbar only? When targeting a MenuItem in an Action Bar (AppCompatActivity) the overlay is below the action bar.
Thanks Nicola