android - click on image that has a layout above -


Why can not I click this image?

I am trying for a little while but this does not work. This idea is to set up a ScrollView with a View Pager, which is making clickable but I am not able to do this. So I started with this simple example - and also

code

  @TargetApi (Build.VERSION_CODES is not able to do this GINGERBREAD) @ Override Protected Zero (Bundle Saved InstantState) {Super. Contents (Saved Instantstate); SetContentView (R.layout.activity_main); Final Imageview ivView = (ImageView) findViewById (R.id.test); ivView.setOnClickListener (New View.OnClickListener () {public void See onClick (v) {Toast.makeText (MainActivity.this, "toast", Toast.LENGTH_SHORT) .show ();}}); }  

layout file

  & lt; Fremleaut xmlns: android = "http://schemas.android.com/apk / res / Android" xmlns: device = "http://schemas.android.com/tools" Android: layout_width = "match_parent" Android: layout_height = "Match_parent" tool: Reference = "MainActivity." Android: Clickable = "true" Android: Filter Touches When Pigeon = "True" & gt; & Lt; imageView android: id = "@ + id / test" Android: Layout_width = "Fill_parent" Android: layout_height = "200dp" android: background = "@ drawable / ic_launcher" android: gravity = "center" Android: FilterTouchesWhenObscured = "true" /> & Lt; scrollview android: id = "@ + id / ScrollViewProfile" Android: Layout_width = "Match_parent" Android: Layout_height = "Fill_parent" Android: layout_toLeftOf = "@ + id / linearLayout1" Android: OverScrollMode = "never" android: scrollbars = " None "& gt; & Lt; LinearLayout Android: Layout_width = "Match_parent" Android: Layout_height = "Match_parent" android: orientation = "vertical" android: clickable = "false" & gt; & Lt; TextView android: id = "@ + id / textView1" Android: layout_width = "match_parent" Android: layout_height = "100dp" android: text = "TextView" / & gt; & Lt; / LinearLayout & gt; & Lt; / Scrollview & gt; & Lt; / FrameLayout & gt;  

Can someone shed some light on this? Thanks in advance


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -