Note that there are some explanatory texts on larger screens.

plurals
  1. POButton topmost in android
    primarykey
    data
    text
    <p>I have layer, it is transparent. I can click on button only, I want to click through layer.</p> <p>Here's my Manifest:</p> <pre><code>&lt;activity android:name=".Test" android:theme="@style/Theme.Transparent"/&gt; </code></pre> <p>Here's Transparent theme style:</p> <pre><code>&lt;style name="Theme.Transparent" parent="android:Theme"&gt; &lt;item name="android:windowIsTranslucent"&gt;true&lt;/item&gt; &lt;item name="android:windowBackground"&gt;@android:color/transparent&lt;/item&gt; &lt;item name="android:windowContentOverlay"&gt;@null&lt;/item&gt; &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt; &lt;item name="android:windowIsFloating"&gt;true&lt;/item&gt; &lt;item name="android:backgroundDimEnabled"&gt;false&lt;/item&gt; &lt;/style&gt; </code></pre> <p>Here's my Activity code:</p> <pre><code>import android.app.*; import android.os.*; import android.view.*; import android.widget.*; public class Test extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.test); // v I can touch through app, but cant click on button getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE); // ^ I can touch through app, but cant click on button Button xclose = (Button) findViewById(R.id.buttonx); xclose.setOnClickListener(new View.OnClickListener() { public void onClick(View arg0) { finish(); } }); } } </code></pre> <p>Here's my test.xml layout:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;Button android:id="@+id/buttonx" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:text="X" /&gt; &lt;/RelativeLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload