Android OnClick not working on android 4.3 -


I have a piece inside the main activity. There is an image view in the piece. My purpose is to split the image view into 3 different buttons.So, I have a linear layout which establishes image overlaps and it is included in 3 clickable ideas with equal severity.

In the piece I OnClickListener applies, as this -

  The spread of the dispersion in the public square FragmentHome menu is OnClickListener {see the view; Reference activity_context; See buttons_search_1; See button_search_2; See buttons_search_3; ... other stuff lots of public FragmentHomeMenu () {} @Override public view onCreateView (LayoutInflater inflater, ViewGroup container, bundle savedInstanceState) {view = inflater.inflate (R.layout.fragment_home_menu, container, false); Activity_context = getActivity () GetApplicationContext (); Button_search_1 = See (see). FindViewById (R.id.button_search_1); Button_search_1.setOnClickListener (this); Button_search_2 = (see) view.findViewById (R.id.button_search_2); Button_search_2.setOnClickListener (this); Button_search_3 = (see) view.findViewById (R.id.button_search_3); Button_search_3.setOnClickListener (this); ... to see a lot of things back; } @ Override Attach on Public Zero (activity activity) {super.onAttach (activity); Activity_context = activity.getApplicationContext (); } @ Override Public Zero (see V) {Log. W ("", "something was clicked"); Switch (v.getId ()) {case R.id.button_search_2: dostuff1 (); // stuff1 is not happening in Android 4.3, but works on 4.0 breaks; Case R.id.button_search_1: dostuff2 (); // stuff2 is not happening in Android 4.3, but works on 4.0 brakes; ... Problems were examined in many places but the solution could not be found. My code works perfectly with devices with Android 4.0, but there is nothing in 4.3 when I click on the image.  

Here is xml

  .......  & Lt; Android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_alignBottom = "@ + id / imageview_searchbar" Android: layout_alignLeft = "@ + id / imageview_searchbar" Android: layout_alignRight = "@ id / imageview_searchbar" Android: Layout_alignTop = "@ + Id / imageview_searchbar" Android: Orientation = "Horizontal" Android: weightSum = "21" & gt; & Lt; See android: id = "@ + id / button_search_1" Android: layout_width = "0dp" Android: layout_height = "match_parent" Android: layout_weight = "7" android: clickable = "true" / & gt; & Lt; See android: id = "@ + id / button_search_2" Android: layout_width = "0dp" Android: layout_height = "wrap_content" Android: layout_weight = "7" android: clickable = "true" / & gt; & Lt; See android: id = "@ + id / button_search_3" Android: layout_width = "0dp" Android: layout_height = "wrap_content" Android: layout_weight = "7" android: clickable = "true" / & gt; & Lt; / LinearLayout & gt; ....... many other stuff  

I thought it - I just linear layout (with button) took time hidden under the image use was to bring Android 4.3 so I did it -

  LinearLayout search_bar_buttons = (LinearLayout) view.findViewById (R. Id.ll_search_bar_buttons); Search_bar_buttons.bringToFront ();  

Thank you for thanking


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 -