Innaz Review, Samsung Galaxy, price and specifications, Flash Android, Games For Your Apple, Jailbreak Tool For iOS, IMEI Unlock Method

Kamis, 30 April 2015

How to solve the ListView scrolling problem inside ScrollView as a parent in Android Java

How to solve the ListView scrolling problem inside ScrollView as a parent in Android Java - In the past, when I started to start blogging, many thoughts disturbed me. I want to have a blog with a nice and interesting look. I am constantly looking for basic tutorials from some web and blogs on the internet. And thankfully, one by one I started to do it, and of course have to go through some confusion process first, but the most important of a blog that is content, yes on the blog Innaz Review we will discuss a lot of information about gadgets that are very in need by you, now we will discuss first about How to solve the ListView scrolling problem inside ScrollView as a parent in Android Java please refer to the information we will convey until completion:

Articles : How to solve the ListView scrolling problem inside ScrollView as a parent in Android Java
full Link : How to solve the ListView scrolling problem inside ScrollView as a parent in Android Java

You can also see our article on:


How to solve the ListView scrolling problem inside ScrollView as a parent in Android Java

Hi there,

Now iam going to give you a solution for "How to solve the ListView scrolling problem inside ScrollView as a parent in Android Java".

Introduction
Most of us we developers,facing problems while adding a ListView into a layout inside a ScrollView because of the screen size the items of the layout may overflow,so what we developers must want to use a ScrollView for solving that overflow problem.But there comes the problem what happense when we put a ListView as an item into the ScrollView.Due to multiple scrollable items in a single screen,the android os confused to handle the scroll event for which item the ListView or ScrollView,atlast it will give scroll event to ScrollView as it is the top most view considering the ListView.



How to get the touch event to ListView?
Don't feel overloaded it is simple to get all the things done.

  • Only one thing we want to do is just initialize a custom TouchListener for the ListView.
  • Initialize the ListView 

ListView itemsList=(ListView)findViewById(R.id.listItemsSale);

  •  Now simply add a TouchListener to the ListView.
itemsList.setOnTouchListener(new OnTouchListener() {
   // Setting on Touch Listener for handling the touch inside ScrollView
   @Override
   public boolean onTouch(View v, MotionEvent event) {
   // Disallow the touch request for parent scroll on touch of child view
   v.getParent().requestDisallowInterceptTouchEvent(true);
   return false;
   }
});

Conclusion
Feel free to use the above code anywhere you want.Any new ideas or helps feel free to use the comment box. 



so much information How to solve the ListView scrolling problem inside ScrollView as a parent in Android Java

hopefully How to solve the ListView scrolling problem inside ScrollView as a parent in Android Java information can provide benefits for you in determining the gadgets that fit your needs in daily life.

you just read How to solve the ListView scrolling problem inside ScrollView as a parent in Android Java if you feel this information is useful and want to bookmark or share it please use link https://innaz2.blogspot.com/2015/04/how-to-solve-listview-scrolling-problem.html if you want more information please search on other pages this blog.

Tag :
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : How to solve the ListView scrolling problem inside ScrollView as a parent in Android Java

0 komentar:

Posting Komentar