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

  • Home
  • SEARCH
  • 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 7661805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:38:51+00:00 2026-05-31T13:38:51+00:00

I’m trying to make a file manager application where I list the contents of

  • 0

I’m trying to make a file manager application where I list the contents of a certain directory in a ListFragment in the upper half of the screen(needless to say this list could be scrollable) and when a user taps on a certain file/folder, the meta-data associated with it should be visible in a FrameLayout placed right below the fragment, along with a thumbnail image of the file type. Here’s my layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent" 
android:layout_height="match_parent"
android:background="#00000000">

<ScrollView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_weight="0.4" >

<fragment
    android:id="@+id/titles"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    class="com.test.fileManager.FileManagerActivity$TitlesFragment"
/>

</ScrollView>

<FrameLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_weight="0.6"
    android:background="#00000000"
    >
</FrameLayout>

</LinearLayout>

I used ‘layout_weight’ property first without the ScrollView tags, but those weight properties are just not respected by the fragment and the list extends well upto the bottom of the screen.

When I enclose the fragment in ScrollView tags(I know..not a good idea!), I only see one entry of the list at a time.

Is there anyway in which I can have the ListFragment occupy the top 40% of the screen and display a scrollable list in that 40% screen space, when necessary?

  • 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-31T13:38:52+00:00Added an answer on May 31, 2026 at 1:38 pm

    First, get rid of the ScrollView. If TitlesFragment is a ListFragment, you cannot reliably put a ListView (from the ListFragment) in a ScrollView.

    Next, set the height of the fragment to be 0px. You cannot reliably use match_content as the height of a ListView.

    Then, to do things purely by percentage, also set the height of your FrameLayout to 0px, then assign your weights as you wish (e.g., 40 for the fragment and 60 in the FrameLayout).

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

Sidebar

Related Questions

I am trying to render a haml file in a javascript response like so:
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters

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.