Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am trying to tell you what I thought to make it, may not be the best solution, just a reference. All sources here are pseudo-code.</p> <p>Here is the parent layout, and set button and your popup window at same position:</p> <hr> <pre><code>&lt;RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;Button android:layout_marginTop="80dp" android:layout_marginLeft="80dp" &gt; &lt;/Button&gt; &lt;com.yourdomain.android.PopupWindow android:layout_marginTop="80dp" android:layout_marginLeft="80dp" android:visibility="GONE"&gt; &lt;/com.yourdomain.android.PopupWindow&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Here is the layout of your popup window:</p> <pre><code> &lt;LinearLayout android:id="@+id/linearlayout1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:visibility="visible" &gt; &lt;/LinearLayout&gt; </code></pre> <p>Here you can create a class to bind to this layout, so its your custom component:</p> <pre><code>public class PopupWindow extends LinearLayout { protected Context _context = null; public PopupWindow (Context context, AttributeSet attrs) { super(context, attrs); // TODO Auto-generated constructor stub _context = context; setupView(context); } public PopupWindow (Context context) { super(context); // TODO Auto-generated constructor stub _context = context; setupView(context); } public void setupView (Context context) { // here to initialize all children views in this layout } public void show () { this.setVisibility (LinearLayout.Visible); } public void hide () { this.setVisibility (LinearLayout.GONE); } } </code></pre> <p>I hope this helps.</p>
    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.
    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