How to implement scrolling in TableLayout? - android

I have implemented simple database android application.In which I have displayed list of name and images.But if data is more then ten then table layout is not scrolling vertically.
Is it possible to implement vertical scrolling without using scrollview?
If possible then please provide me some reference.
Thanks in advance.

Why do you want to do it without using ScrollView? You can simply wrap your TableLayout inside a ScrollView to add the functionality.
I've always used ScrollView so I can't really give you a way to do this without using it.
Random link off Google that explains it pretty well: http://huuah.com/using-tablelayout-on-android/

As #Klaus said, you have to implement a ScrollView. Nonetheless, you can set
android:scrollbars="#null"
in the XML resource and in that way the scrollbar will be "invisible"

Hi
Here is a good article http://blog.sptechnolab.com/2011/02/01/android/android-custom-listview-items-and-adapters/. It is in LinearLayout but is someone write comment over there then i can convert the layout file into TableLayout.

Related

What techniques do you think duolingo used to make its lesson list in the app?(pic included)

I'm trying to make the duolingo lesson list for fun because im a big fan of the app, im a beginner programmer.
basically id like your opinion on how you think they did it.
here is what it looks like
https://s-media-cache-ak0.pinimg.com/236x/a3/a8/65/a3a865c47153078e7004b74652af7757.jpg
I think it might be a scroll view and linear layout, then perhaps a class for each icon/progress/name combo that will change based on progress
I think a table layout might be an easier solution.
Check it out here: https://developer.android.com/guide/topics/ui/layout/grid.html
I figured out how to do it, you need to use a scrollView followed by a linearlayout.
Then you can programatically add in relative layouts as rows and in those relative layouts make another square relative layout and in that relative layout you stack up the stuff like image/text/progress

Android - Relative layout inside ScrollView

How can I put relative layout inside a scrollview? I want a scrollable view that contains pictures and texts like this:
I searched the Internet for solution or example, but in every sample project they use linear layout. Please help!
Thanks in advance.
Take a look at this tutorial it has exactly what you need.
Based on what you are describing + your mock, you should use a ListView with a header that contains your picture (on the top of the list)

android pagination with multiple textviews

I need to implement pagination in my android app. I have multiple textviews in my android application. I need to display it as pages in my UI.
Am adding textview dynamically to my scrollview layout. Inside my scrollview there may more than one Textviews with dynamically loaded texts with different height. I need to implement pagination with this. How can i achieve this, please provide me some ideas or working codes.
Maybe user ViewPager? It provide you pages where you can apply fragment with any view you want. You can use it on part of screen.
Simple tutorial

Which layout should I use so my app looks like Google Plus?

I'd like to make a layout similar to the one used in the current version of Google Plus:
I don't know which layout I must use because :
- I can't use a GridView because it doesn't support spanning row.
- I can't use a GridLayout nor LinearLayout because the number of elements to show is dynamic
- I can't use a ScrollView because I want an AdapterView to re-use child elements
- I can use a ListView with two differents cells types but I can't use the built-in OnItemClickListener.
Do you have better ideas than me?
Thank you very much :)
this post suggested that it uses StaggeredGridView . I personally haven't tried it.
You can very well use RelativeLayout for this.
With a single Relative Layout you should be able to create exactly same layout.
Additionally, your content can be dynamically added to Relative Layout pretty easily (by setting proper LayoutParams to the content to be added).

linearlayout/textviews scrollable?

Any easy to make a simple linearlayout with a buncha textviews scrollable? Right now, the last textview gets cut off...
(I don't really wanna use a listview)
Use ScrollView
An example here:
http://www.androidpeople.com/android-scrollview-example/
You can find many more examples using Google.

Categories

Resources