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 8971757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:02:29+00:00 2026-06-15T18:02:29+00:00

I use monodevelop ti android developing. I wanna add a loading item in end

  • 0

I use monodevelop ti android developing. I wanna add a loading item in end of my list that is loading from internet.
I use this xml file for this propose:

 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="125dp">
<RelativeLayout
    android:id="@+id/LoadingRealtive"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dip"
    android:background="@drawable/List_Menu_Bg"
    >
    <ProgressBar
        android:id="@+id/loadingListItems"
        style="@style/GenericProgressIndicator"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true" />
    <TextView
        android:text="Loading..."
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/loadingListItems"
        android:id="@+id/textView1"
        android:layout_centerHorizontal="true"
        android:textColor="#6b6b6b" />
</RelativeLayout>
<RelativeLayout
    android:id="@+id/MainRelative"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dip"
    android:background="@drawable/List_Menu_Bg">...MyListItems    </RelativeLayout></LinearLayout>

and in View of my list used this code:

public override View GetView (int position, View convertView, ViewGroup parent)
    {
        View vi = convertView;

        try {

            if (convertView == null)
                vi = activity.LayoutInflater.Inflate (Resource.Layout.list_row, parent, false);

            RelativeLayout LoadingRelative=(RelativeLayout ) vi.FindViewById (Resource .Id.LoadingRealtive);
            RelativeLayout ContentRelative=(RelativeLayout ) vi.FindViewById (Resource .Id.MainRelative );



            if(Data [position ] == null)
            {
                ContentRelative .Visibility =ViewStates.Gone ;
                LoadingRelative .Visibility = ViewStates.Visible ;
            }else{
                ContentRelative .Visibility =ViewStates.Visible  ;
                LoadingRelative .Visibility = ViewStates.Gone  ;<...MyListCodes...>
            }
        } catch (Exception ex) {
            Common.HandleException (ex);
        }
        return vi;
    }

It work fine.just problem is that the loading layout loads wrap_content while it must load fill_parent.
I don’t understand why it is?
can any body help me?

  • 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-06-15T18:02:30+00:00Added an answer on June 15, 2026 at 6:02 pm

    when use linearlayout as a wrapperview, you should give android:weight to its chield views which has fill_parent attribute.

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="125dp">
    <RelativeLayout
        android:id="@+id/LoadingRealtive"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:padding="5dip"
        android:background="@drawable/List_Menu_Bg"
        android:weight="1"
        >
        <ProgressBar
            android:id="@+id/loadingListItems"
            style="@style/GenericProgressIndicator"
            android:layout_centerVertical="true"
            android:layout_centerHorizontal="true" />
        <TextView
            android:text="Loading..."
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/loadingListItems"
            android:id="@+id/textView1"
            android:layout_centerHorizontal="true"
            android:textColor="#6b6b6b" />
    </RelativeLayout>
    <RelativeLayout
        android:id="@+id/MainRelative"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:padding="5dip"
        android:background="@drawable/List_Menu_Bg"        
        android:weight="1" >
     </RelativeLayout>
    

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

Sidebar

Related Questions

I'm trying to use the Rect structure from System.Windows in MonoDevelop, but I can't
What command should I use to start this C# program from the command line
I have a mono android project. I can use monodevelop to build the apk
Hi all i'm trying to make a MonoDevelop addin that I can use to
use Modern::Perl; use Algorithm::Permute; use List::AllUtils qw/uniq/; find_perms(1151); sub find_perms { my ($value) =
This question is specific to MonoDevelop I think. I've got a test monorail solution
I've tried to use MonoDevelop 2.4 and 2.6 with Ubuntu 11.04, but neither of
I want to use Gtk# and MonoDevelop for drawing some graphic primitives (for example,
Assuming I want to use a xib in interface builder, to add a UIViewController
I want to use Opencv 2.4.0 (beta2) together with EmguCV and MonoDevelop on my

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.