android-scrollview

How to reach the last items of a scroll view?

一个人想着一个人 提交于 2021-02-08 10:06:27
问题 I'm trying to display a list in a fixed size scrollview, at first it was the first items who weren't showing and I fixed it but now it's the last ones that aren't reachable. Here is my xml code: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout

How to get absolute coordinates from Views in a RelativeLayout

拜拜、爱过 提交于 2021-01-28 03:12:44
问题 I have the following Layout: <ScrollView> <RelativeLayout> <RelativeLayout> <View android:id="@+id/vline" android:layout_width="match_parent" android:layout_height="1dp" android:background="@color/md_white_1000"/> <ImageButton>...</ImageButton> </RelativeLayout> </RelativeLayout> </ScrollView> The different Layouts have there own content and height on different screens of course. Now I want, by pressing the ImageButton, to smoothly scroll my ScrollView up so that the Views upper left corner

How to get absolute coordinates from Views in a RelativeLayout

自古美人都是妖i 提交于 2021-01-28 01:22:22
问题 I have the following Layout: <ScrollView> <RelativeLayout> <RelativeLayout> <View android:id="@+id/vline" android:layout_width="match_parent" android:layout_height="1dp" android:background="@color/md_white_1000"/> <ImageButton>...</ImageButton> </RelativeLayout> </RelativeLayout> </ScrollView> The different Layouts have there own content and height on different screens of course. Now I want, by pressing the ImageButton, to smoothly scroll my ScrollView up so that the Views upper left corner

Using DiffUtil, How to prevent blocking the main thread when updating the recyclerView contained in a NestedScrollView?

久未见 提交于 2020-12-07 10:56:01
问题 I'm trying to udate my recyclerView in background Thread without any succes. Updating the recyclerView still block the main thread. Here my adapter: public class PostAdapter extends RecyclerView.Adapter<PostAdapter.PostViewHolder> { private List<PostItems> postList; private Context context; private Queue<List<PostItems>> pendingUpdates = new ArrayDeque<>(); PostAdapter(List<PostItems> postList, Context context) { this.postList = postList; this.context = context; } @NonNull @Override public

Using DiffUtil, How to prevent blocking the main thread when updating the recyclerView contained in a NestedScrollView?

穿精又带淫゛_ 提交于 2020-12-07 10:55:07
问题 I'm trying to udate my recyclerView in background Thread without any succes. Updating the recyclerView still block the main thread. Here my adapter: public class PostAdapter extends RecyclerView.Adapter<PostAdapter.PostViewHolder> { private List<PostItems> postList; private Context context; private Queue<List<PostItems>> pendingUpdates = new ArrayDeque<>(); PostAdapter(List<PostItems> postList, Context context) { this.postList = postList; this.context = context; } @NonNull @Override public

Child inside NestedScrollView not cover full height of screen

China☆狼群 提交于 2020-12-01 08:24:19
问题 I am using NestedScrollView in my fragment. In my xml inside a RelativeLayout but it is not covering full height of screen. Below is my code - <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:fitsSystemWindows="true" android:background="@color/black" android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:background="

Child inside NestedScrollView not cover full height of screen

ぐ巨炮叔叔 提交于 2020-12-01 08:22:52
问题 I am using NestedScrollView in my fragment. In my xml inside a RelativeLayout but it is not covering full height of screen. Below is my code - <?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:fitsSystemWindows="true" android:background="@color/black" android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout android:background="

Android - ScrollView and PercentRelativeLayout

拜拜、爱过 提交于 2020-02-04 15:17:26
问题 I have a problem with combining the android.support.percent.PercentRelativeLayout with ScrollView. The following xml file <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/ScrollView01" android:layout_width="fill_parent" android:layout_height="fill_parent" android:fillViewport="true" android:scrollbars="none"> <android.support.percent.PercentRelativeLayout xmlns:android="http://schemas.android.com/apk

ScrollView with a ListView doesn't scroll - android

巧了我就是萌 提交于 2020-01-29 04:11:26
问题 My problem with the following layout is that the layout doesn't scroll. My requirement is that I have to display 2 lists which at times can be big. So i put both the ListViews inside a ScrollView so that i can scroll to the bottom and have a look at both the ListViews. I don't want the ListView to scroll . I only want my ScrollView to behave as it should. Any suggestions?? <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android

Use scrollView between two Linear Layout inside a LinearLayout

落花浮王杯 提交于 2020-01-26 00:28:49
问题 i want to put two scroll view on two layouts that are in inside a main layout .Here is my XML file Please help me on this <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/flightResultData" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="8dp" android:gravity="center_horizontal" android:orientation="horizontal" > <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content"