I have a HorizontalScrollView and a button in my project. I want this to â -> when the button pressed the HorizontalScrollView button, don't scroll. The real user can commit the view.
I use this code, but it does not work.
Button btn_s = (Button) findViewById(R.id.button999); final HorizontalScrollView h_scroll = (HorizontalScrollView) findViewById(R.id.horizontalScrollView1); btn_s.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { h_scroll.setVisibility(0); } })
source share