scrollview

How to always show scrollbar

天大地大妈咪最大 提交于 2020-01-09 02:53:41
问题 The scrollbar in my scrollview is only visible when I start scrolling. How can I always show it? 回答1: As of now the best way is to use android:fadeScrollbars="false" in xml which is equivalent to ScrollView.setScrollbarFadingEnabled(false); in java code. 回答2: Setting the android:scrollbarFadeDuration="0" will do the trick. 回答3: There are 2 ways: from Java code: ScrollView.setScrollbarFadingEnabled(false); from XML code: android:fadeScrollbars="false" Simple as that! 回答4: Try this as the above

Can I scroll a ScrollView programmatically in Android?

£可爱£侵袭症+ 提交于 2020-01-08 12:01:33
问题 Is there any way to scroll a ScrollView programmatically to a certain position? I have created dynamic TableLayout which is placed in a ScrollView . So I want that on a specific action (like clicking a Button, etc.) the particular row should scroll automatically to a top position. Is it possible? 回答1: ScrollView sv = (ScrollView)findViewById(R.id.scrl); sv.scrollTo(0, sv.getBottom()); or sv.scrollTo(5, 10); 回答2: The answer from Pragna does not work always, try this: mScrollView.post(new

Unable to scroll down in TV(EPG-GUIDE)Using TV Remote Down Button

霸气de小男生 提交于 2020-01-07 05:01:07
问题 1.I am Developing an android application as Electronic Program Guide(EPG) for set-top-box followed by this project https://github.com/codessentials/android-tv-epg." 2.I can able to navigate left to right,rigtht to left(Horizontal scroll) & able to see the focus also(Left & right Remote key navigation), 3.I can't navigate Top to Bottom & Bottom to Top,unable to scroll it & can't see the focus,that view fully opened, so focus went to down but i can't see that. 4.How to scroll as Top to buttom

Scrollview contains ViewPager and LinearLayouts with TextView inside the LinearLayout,But TextView ClickListener is not working(Not Clickable)?

☆樱花仙子☆ 提交于 2020-01-07 03:52:35
问题 <nl.vogelbescherming.wadvogels.util.HackyScrollView android:id="@+id/scroll" android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" android:scrollbarStyle="outsideOverlay" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <nl.vogelbescherming.wadvogels.util.HackyViewPager android:id="@+id/profiles" android:layout_width="match_parent" android:layout_height="match_parent"

Scrollview only Works in Listview

半腔热情 提交于 2020-01-06 19:35:22
问题 I have the following layout defined in my app: <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content"> <ImageView android:id="@+id/disco_photo" android:layout_width="match_parent" android

Android google-play-liked listview

谁都会走 提交于 2020-01-06 19:28:04
问题 Im new to android and practicing with an UI like googleplay apps, this is default view of the list : when i scroll the list view up , the action bar got scrolled up and disappeared , basically my English is too bad and i dont know how or which keyword i must use in google search to get the result like this (as you see it looks like the action bar is inside the listview ) please show me how or give me an example to learn, thank you ! 回答1: you can define your layout structure like following :

Layout challenge when using native date/time picker on Android 5.1.x

为君一笑 提交于 2020-01-06 18:55:11
问题 I have a kind of "catch 22" situation here. I am using Appcelerator Titatium SDK 5.1.2. On Android 5.1.x with a very small screen size I cannot find a solution to correctly select date and time using the native pickers. I need to add a <ScrollView> to allow the user to move the contents to make the picker entirely visible. However, when doing this on Android 5.1.x the user cannot scroll back to previous months in the date picker.... Changing it to a <View> control makes the date picker behave

ScrollView within ViewFlipper does not work although using onTouchEvent

谁说胖子不能爱 提交于 2020-01-06 12:40:38
问题 In this post: Android: ScrollView in flipper It was suggested to set an onTouchnListener to the ScrollView which is part of a child of a ViewFlipper. I did that and also used the same logic: public class MainActivity extends Activity implements OnGestureListener { // ... @Override protected void onCreate(Bundle savedInstanceState) { // ... this.gestureDetector = new GestureDetector(this); // .. createViews(); } private void createViews() { LayoutInflater inflater = (LayoutInflater) context

React Native ScrollView - How to scroll to a child component from another child component button?

你离开我真会死。 提交于 2020-01-06 08:43:18
问题 I have this structure with a ScrollView, which is a parent with 5 childs Parent Component with ScrollView Component1 Component2 Component3 Component4 Component5 Inside Component3 I have a button that when pressed should scroll parent component ScrollView to Component5 Something like this Home (Parent) export default class Home extends React.Component { renderComments() { return this.state.dataSource.map(item => <CommentDetail key={item.id} comment={item} /> ); } render() { return (

Sticky Header/Footer with ScrollView in between

核能气质少年 提交于 2020-01-06 08:21:10
问题 I face that situation multiple times creating application and I don't really know how to handle it properly. These are the elements I want: Sticky view at the top (Toolbar or label...) ScrollView containing an undefined number of elements (Lets say EditText) Sticky button at the bottom that isn't part of the ScrollView. I lost when it comes to set the height of the ScrollView since it might varies depending of the phone size... Should I embed them all in a LinearLayout? (Header, ScrollView