some kind of weird problem in layouts.. I have a linear layout like below which has text view and image view... i have written a click event for linear layout - like on click of that linearlayout (id is verify) i have got some stuffs to do... i have found that -- those two child views are also taking those click events and ending up in two execution simultaneously... i could not disable those focus or clickable events.... ( on click of that event - i am calling an async ) is there any to disable those views from taking focus... i have tried most of it like android:focusable and android:clickable.... but it did not help.. :(
<LinearLayout
android:id="@+id/verify"
android:layout_width="150dp"
android:layout_height="100dp"
android:layout_marginLeft="10dp"
android:background="@drawable/clearbluesky"
android:orientation="vertical"
>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"
android:text="Verify"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/black" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="70dp"
android:layout_height="30dp"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:clickable="false"
android:focusable="false"
android:src="@drawable/fps" />
</LinearLayout>
continue.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
new AsyncTask<String, String, String>()
{
boolean testresult = false;
boolean clearBuf = false;
ProgressDialog progressDialog = null;
@Override
protected void onPostExecute(String result){ super.onPostExecute(result);
progressDialog.dismiss();
}
@Override
protected void onPreExecute() {
super.onPreExecute();
progressDialog = new ProgressDialog(getApplicationContext());
progressDialog.setMessage("Continue");
progressDialog.setIndeterminate(false);
progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
progressDialog.show();
}
@Override
protected String doInBackground(String... params) {
// Calling some function
return null;
}
}.execute("");
});