android-scroll

List View Scroll Not Smooth

扶醉桌前 提交于 2020-01-21 11:48:21
问题 i have a custom list view, which displays users, and there photos i retrieve the data from API, Which gives JSON Output, My Issue is that the list view is not scrolling smoothly, it hangs for a sec and scrolls, it repeats the same till we reach the end. i thought it might me because i am running network related operation on the UI thread, but it continues to do that even after it completes loading? the structure of my custom Listview is <TextView style="@style/photo_post_text" android:id="@

Scroll a View and refresh content

流过昼夜 提交于 2020-01-03 09:07:12
问题 I use the following user interface: A parent relative layout parentLayout with the dimensions 800x600 (width x height) A second relative layout childLayout , which is a child of the parent layout. It has the dimensions 800x1000, i.e. it is larger than the parent layout. parentLayout.addView(childLayout); My goal: Scrolling childLayout by using childLayout.scrollTo(x,y) . When I use childLayout.scrollTo(x,y) , Android scrolls childLayout but doesn't refresh (redraw) it. The effect is, that

Android RecyclerView smooth scroll to view that's animating their height

不想你离开。 提交于 2019-12-21 01:12:52
问题 I have a RecyclerView with Expandable Child Views, when the child ViewGroup is clicked it inflates an amount of views animating the ViewGroup height from 0 to the measured viewgroup height, like the following gif: The problem is: I'm calling smoothScrollToPosition on recyclerView, it smooth scroll to the view position, but it considers the current view height, which is still not expanded, in the above gif i'm touching on the under view of the recyclerview, which dont scroll to position

Android RecyclerView smooth scroll to view that's animating their height

青春壹個敷衍的年華 提交于 2019-12-21 01:12:32
问题 I have a RecyclerView with Expandable Child Views, when the child ViewGroup is clicked it inflates an amount of views animating the ViewGroup height from 0 to the measured viewgroup height, like the following gif: The problem is: I'm calling smoothScrollToPosition on recyclerView, it smooth scroll to the view position, but it considers the current view height, which is still not expanded, in the above gif i'm touching on the under view of the recyclerview, which dont scroll to position

Is it possible to add a scrollable TextView to a ListView?

99封情书 提交于 2019-12-18 17:14:14
问题 I have a ListView where each row has a fixed height. Every row contains, next to some images, a TextView. Sometimes, the text I want to display is too large and hence I would like to make it scrollable. So I added (based on Making TextView scrollable on Android) the following lines to my TextView text.setMaxLines(5); text.setVerticalScrollBarEnabled(true); text.setMovementMethod(ScrollingMovementMethod.getInstance()); This works fine if I use the TextView in isolation but not when I put the

Android listview not scrolling

人走茶凉 提交于 2019-12-18 09:19:12
问题 i have a layout whose starting tag(parent tag is ) is <scroll view xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> later i have many images , textView , Edit text and other things, and finally a list view. i have defined the hight of listview as 230dp as prescribed to me. the thing is the whole layout is scrolling nice, but the content inside the listview is not scrolling individually . this is how the xml

list view position is getting changed when scrolling on android

隐身守侯 提交于 2019-12-17 16:35:20
问题 I have list view [text view and check box controlls] with more data. I will choose the item from list view and display the selected items in the next activity. My problem is, for the example if I choose 20th and 25th item in the list view it will display some other items in the next activity. That is list view position is getting changed when scrolling. i am choosing an item by clicking the check box on the item. in the checkbox.setOnChanged listener i wrote code for which position is

How to do the new PlayStore parallax effect

浪尽此生 提交于 2019-12-17 10:16:00
问题 Does anyone know how can I achieve the new parallax scrolling effect - you can see the effect when you open an app on the PlayStore and try to scroll down, the content goes over the top image. How can I achieve that? 回答1: Google has recently announced Design support library and with this it has support for implementing Collapsing Toolbar . In addition to pinning a view, you can use app:layout_collapseMode="parallax" (and optionally app:layout_collapseParallaxMultiplier="0.7" to set the

Disable scrolling in webview?

删除回忆录丶 提交于 2019-12-16 22:37:11
问题 Until now I have been an iPhone developer only and now I have decided to give Android a whirl. Something I haven't been able to figure out on Android is how to programmatically prevent scrolling in a WebView ? Something similar to iPhones prevention of the onTouchMove event would be great! 回答1: Here is my code for disabling all scrolling in webview: // disable scroll on touch webview.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) {

RecyclerView scroll to position and get that view

核能气质少年 提交于 2019-12-13 01:28:35
问题 I want to auto scroll a list item to top (firstVisible item) in my recycler view and get the view at that position, so I can highlight it, from my fragment. So, this is the gist of my fragment code : private void activateNewListItem(int position) { mLayoutManager().scrollToPositionWithOffset(position, 0); RecyclerView.ViewHolder viewHolder = mRecyclerView.findViewHolderForLayoutPosition(position); View view = viewHolder.getItemView(); view.setBackgroundColor(getResources().getColor(R.color