Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6986159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:46:23+00:00 2026-05-27T18:46:23+00:00

Assumptions about the list (updated): It will not contain more than 10 list elements

  • 0

Assumptions about the list (updated):

  • It will not contain more than 10 list elements (the list elements are defined by the xml layout below).
  • The height of every element is unknown, because the list element contain a LinearLayout that can have up to 20 child views (see xml below).

XML Layout of the list element:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation:"horizontal">

    <!--
        This LinearLayout is going to contain one or more 
        Views which will be added progammatically on runtime.
        The number of children views added to it depend on the 
        data to be displayed, and the only assumption that can 
        be made is that there's will be no more than 20 child 
        views for one particular instance of this LinearLayout.
    -->
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginRight="25dp"/>

    <ImageButton
        android:layout_width="25dip"
        android:layout_height="25dip"
        android:layout_gravity="center|top"
        android:layout_marginLeft="-25dp"/>
</LinearLayout>

Questions:

  • Does it make any sense to use a ListView for a layout that has such freedom
    in its structure (like the one above), and still being able to make use of the
    convertView as passed in to the ListView#getView(...)?
  • As an alternative, would it be wrong to put all the list elements in an outer
    LinearLayout and put this within a ScrollView? By doing this, I wouldn’t get
    caching abilities of the ListView, but maybe it wouldn’t be so heavy given the
    assumptions about the list? (see top). (Any pointers on how to make this alternative look and feel like a ListView? I’m thinking of applying standard colors and selectors etc.)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:46:24+00:00Added an answer on May 27, 2026 at 6:46 pm

    If you know some of your 10 elemets will be the same, you could use

    getItemViewType(int position)

    To be sure that the convertView will match your item type convertView

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Do not make assumptions about the contents of the player identifier string. Its format
I have been thinking about a regular expression that can transform a list like
Now I know about the normal CSS list styles (roman, latin, etc) and certainly
Are my two assumptions about properties correct? @interface Foo : NSObject { NSDate *Created;
When executing Mathematica's NullSpace command on a symbolic matrix, Mathematica makes some assumptions about
Here are my basic assumptions: Wcf executes my service operation methods on IOCP threads
What are (if any)the implied assumptions or restrictions and the differences of designing like:
I was hoping someone could validate my assumptions before I recommend that my client
I am in the process of writing some validation code based on these assumptions:
I'm confused. Answers to my previous question seems to confirm my assumptions. But as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.