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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:14:51+00:00 2026-05-15T23:14:51+00:00

< RelativeLayout android:layout_width=wrap_content android:layout_height=wrap_content> < Button android:text=Previous android:layout_height=wrap_content android:id=@+id/MeasurePrev android:layout_alignParentBottom=true android:layout_width=wrap_content> < / Button>

  • 0
< RelativeLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
        < Button android:text="Previous" 
            android:layout_height="wrap_content" 
            android:id="@+id/MeasurePrev"           
            android:layout_alignParentBottom="true"
            android:layout_width="wrap_content">
        < / Button>
< / RelativeLayout >

Can anyone tell me how can i do this using Java code or in activity class?
I do not know how to set android:layout_alignParentBottom=”true”.
I want to implement whole view via java code.

  • 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-15T23:14:51+00:00Added an answer on May 15, 2026 at 11:14 pm

    Here is a dynamic equivalent of your code :

        RelativeLayout rl = new RelativeLayout(this);
        LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
        rl.setLayoutParams(params);
        Button button = new Button(this);
        button.setText("Previous");
        LayoutParams params1 = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
        params1.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
        button.setLayoutParams(params1);
        rl.addView(button);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<RelativeLayout android:layout_width=fill_parent android:layout_height=50dip> <Button android:text=Edit android:width=50dip android:layout_height=fill_parent android:layout_width=wrap_content android:layout_alignParentLeft=true android:layout_alignParentTop=true /> <ToggleButton android:textOn=All android:textOff=Wishlist
I have a dialog with this content: <RelativeLayout android:layout_width=wrap_content android:layout_height=wrap_content > <ScrollView android:layout_width=fill_parent android:layout_height=wrap_content
This my main.xml <RelativeLayout android:id=@+id/gloabal_permission android:layout_height=fill_parent android:layout_width=wrap_content android:background=@drawable/settings_selector_down android:paddingTop=3dp android:paddingBottom=3dp android:paddingRight=12dp android:paddingLeft=15dp> <TextView android:id=@+id/TextView06
I have a layout defined in XML. It contains also: <RelativeLayout android:id=@+id/item android:layout_width=fill_parent android:layout_height=wrap_content
So my layout looks basically like this: <ScrollView> <RelativeLayout> <BunchOfViews/> <ImageView android:layout_alignParentBottom=true/> </RelativeLayout> </ScrollView>
I have the following layout: <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/aussie_bg_big > <ImageView android:id=@+id/titleImage android:layout_width=wrap_content
i am using following code. <RelativeLayout android:layout_width=310dp android:layout_height=70dp android:layout_below=@+id/UIReportView android:layout_marginLeft=4dp android:layout_marginTop=2dp android:background=@drawable/small_corners > small_corners
This is my layout <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical > <TextView
I've this layout xml, named pagina.xml: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=match_parent android:layout_height=match_parent android:gravity=center_vertical
So, I have this layout: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/layout android:layout_width=fill_parent android:layout_height=wrap_content android:background=#FFFF00

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.