how to add scrollview to screen in android?

I have done my application in portrait configaration but when load my application in to device its coming portraint configaration but I keep in landscape mode missing some controls.

So I want to add scroll view to screen when changing the config to landscape. How I can add ScrollView to screen ?


Asked by: Kellan783 | Posted: 20-01-2022






Answer 1

You could define two version of your layout.
"res/layout/your_layout.xml" - this will be used in portrait mode
"res/layout-land/your_layout.xml" - android will use this when in landscape orientation

If you don't want to do to many changes in your layout you can add ScrollView to landscape version of your_layout.xml.

Regards!

Answered by: Vivian652 | Posted: 21-02-2022



Similar questions

android - Adding view to bottom of layout inside a scrollview

So my layout looks basically like this: <ScrollView> <RelativeLayout> <BunchOfViews/> <ImageView android:layout_alignParentBottom="true"/> </RelativeLayout> </ScrollView> I have the ScrollView so all of the layout always is visible no matter the height of the screen. The problem is that on a very high screen, I still ...


How to set the color of an Android ScrollView fading edge?

I have an Android scrollview with a white background. The fading edge is a white translucent gradient. I would like to change it be black instead of white. I have a ListView in the same project with a white background that has a black fading edge by default, but I can't find where (if anywhere) that was set.


layout - Android: ScrollView Issue

I have had a number of problems with ScrollViews. Recently I tried to create a LinearView which content exceeds the screen size so I created the new layout with parent element ScrollView and set its width and height to custom values (the layout has to appear as dialog - not filling the whole screen). When the element is selected the red border appears to embrace the rectangle of predefined ScrollView LayoutWidth a...


android - How do I create a ListView that's not in a ScrollView, or has the ScrollView disabled?

I want some of the goodies in a ListView, like being able to use a ListAdapter, and item selection, etc, but I don't want the ScrollView portion of it. I want to implement that part myself, in a different way (why or how I do this isn't really the point of this question, so please don't ask "why"). Is there a way to have a ListView that's not in a ScrollView or has the scrolling disabled?


android - Adding view to bottom of layout inside a scrollview

So my layout looks basically like this: <ScrollView> <RelativeLayout> <BunchOfViews/> <ImageView android:layout_alignParentBottom="true"/> </RelativeLayout> </ScrollView> I have the ScrollView so all of the layout always is visible no matter the height of the screen. The problem is that on a very high screen, I still ...


java - ScrollView containing TextView does not scroll

I have a textview displaying many individual words, each word is a link using Spans and setMovementMethod(LinkMovementMethod.getInstance()); The textview is wrapped by a ScrollView. However the ScrollView does not work as the links in the TextView are activated instead. Is there a way to combine a ScrollView and TextView so that both the scrolling and links in the text work?


How to set the color of an Android ScrollView fading edge?

I have an Android scrollview with a white background. The fading edge is a white translucent gradient. I would like to change it be black instead of white. I have a ListView in the same project with a white background that has a black fading edge by default, but I can't find where (if anywhere) that was set.


java - ScrollView alawys scrolling to the bottom

I defined a scrollview with a texteedit in my layout: <ScrollView android:fillViewport="true" android:layout_marginBottom="50dip" android:id="@+id/start_scroller" android:layout_height="fill_parent" android:layout_width="fill_parent" android:fadingEdge="none"> <TextView android:id="@+id/text" android:layout_width="fill_parent" android:layout_height="wrap_co...


android - Enable Scrolling within EditText that is in a ScrollView

Our app (WordPress for Android) uses a scrollview for the new post view, where a user enters in their new blog post. There's quite a few fields on this view, including a large EditText for the post content field. It appears that when an EditText is in a ScrollView, the ScrollView takes over the scrolling action, so the user can't scroll within ...


android - Layout problem: scrollview inside a table, inside a custom dialog

I have a layout problem which I can't fix. I've looked through many posts on here, and mine seems to be unique enough to post a question. I've created a custom Dialog which programmatically creates a 3 row table. The top and bottom rows have text, while the middle row contains a ScrollView, which contains a LinearLayout. That LinearLayout then contains some number of views (TextView in this example). Since I'm doin...


ScrollView in android

I' have a view that contains several textViews an ImageView and a Button . Because on small screen devices (or in landscape mode on big ones ) not all are visible I use a Scroll as the parent of the whole hierarchy to allow the user to view all the information. The things are suck that the button must be at the buttom of the view . However on big screen device , where it remains enough space at the buttom , the button is p...


Android ScrollView jumps around when resized

I have a ScrollView that contains an number of other views (TextViews, ImageViews, etc.). The ScrollView is taller than the screen. I have an AsyncTask that updates the children of the ScrollView based on an http response. I've discovered an interesting behavior that I can't figure out how to work around. If I set any of the children's visibilities to View.INVISIBLE as part of the AsyncTask.onPostExecute(), ever...






Still can't find your answer? Check out these communities...



Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android



top