Note that there are some explanatory texts on larger screens.

plurals
  1. POButton is not clickable?
    primarykey
    data
    text
    <p>I have created a button in my screen's xml like this</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/bg"&gt; &lt;Button android:text="Lets Get Started" android:background="@drawable/btnbg" android:id="@+id/btn_nav_let_strtd"android:layout_width="wrap_content" android:layout_height="35px" android:textColor="#FFFFFF" android:layout_alignParentLeft="true" android:drawableRight="@drawable/arrow" android:drawableLeft="@drawable/nav_getstart"&gt; &lt;/Button&gt; </code></pre> <p> set click listenrss </p> <p>public class NavigationScreen extends Activity implements OnClickListener{ private Button btn_nav_lets_get_strtd;</p> <pre><code>private LinearLayout ll_get_started; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.navigation); btn_nav_lets_get_strtd = (Button) findViewById(R.id.btn_nav_let_strtd); btn_nav_lets_get_strtd.setClickable(true); } private void setOnclickListeners() { btn_nav_lets_get_strtd.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { System.out.println("clicked"); Toast.makeText(NavigationScreen.this, "fgd",Toast.LENGTH_SHORT).show(); } }); } </code></pre> <p>}</p> <p>but when i try to click this button it is not clickable not focusable .. how do i set it as clickable ???</p> <p>and the drawable is not a bitmap it is a statlist drawable btnbg.xmlis here </p> <pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android" android:constantSize="true" android:dither="true" android:variablePadding="true" &gt; &lt;item android:drawable="@drawable/nav_blue_bar" android:state_pressed="true" /&gt; </code></pre> <p></p> <p>any help will be appreciated ...</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.
 

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