Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your code is working fine..</p> <p>The XML file</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" &gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /&gt; &lt;Button android:id="@+id/btnDrawLine" android:layout_width="80dip" android:layout_height="wrap_content" android:layout_above="@+id/btnDraw" android:layout_alignParentLeft="true" android:visibility="invisible" android:text="Line" /&gt; &lt;Button android:id="@+id/draw" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="draw" /&gt; &lt;/LinearLayout&gt; </code></pre> <p>The activity</p> <pre><code>import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; public class DrawCanvasActivity extends Activity { private static final String Number1 = "9686801147"; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final View btnDrawLine = findViewById(R.id.btnDrawLine); Button btnDraw = (Button) findViewById(R.id.draw); btnDraw.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { if (btnDrawLine.getVisibility()== View.VISIBLE) { btnDrawLine.setVisibility(View.INVISIBLE); Log.d("TAG", "INVISIBLE"); } else { btnDrawLine.setVisibility(View.VISIBLE); Log.d("TAG", "VISIBLE"); } } }); } } </code></pre> <p>The button line appears when the draw button is clicked.Guess there may be problem in the view formatting in your code.</p>
    singulars
    1. This table or related slice is empty.
    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