My application must show a couple of images at the bottom of each screen for a few seconds each time the user navigates between fragments. I have implemented it as a custom toast, and I activate it with each navigation. It looks good, but the user cannot click anything while the toast is active. As soon as the toast goes away, they can click and everything works fine. Is there any way to enable user interaction on the views underneath a toast while the toast is visible?
Update:
Here's the code that displays my toast:
LayoutInflater inflater = mainActivity.getLayoutInflater();
View layout = inflater.inflate(R.layout.custom_toast, null, false);
Toast toast = new Toast(mainActivity.getApplicationContext());
toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);
toast.setDuration(Toast.LENGTH_SHORT);
toast.setView(layout);
toast.show();
Here's the layout for the toast:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="30dp"
android:gravity="bottom"
android:layout_gravity="bottom"
android:layout_alignParentBottom="true">
<ImageView
android:id="@+id/imageViewStatsLogo"
android:layout_width="80dp"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_height="30dp"
android:scaleType="centerInside"
android:src="@drawable/stats_logo" />
<ImageView
android:id="@+id/imageViewAPLogo"
android:layout_width="35dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_height="30dp"
android:scaleType="centerInside"
android:src="@drawable/ap_logo" />
</RelativeLayout>
I just tested with a non-custom toast, and I can interact with everything just fine. It must be something with my custom toast. I thought the configuration I have for the relative layout would cause it to only occupy the bottom of the screen. It is acting as though the toast is filling the whole screen.