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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:28:09+00:00 2026-06-13T23:28:09+00:00

i am trying to give spacing between the views in a linearlayout programatically ,

  • 0

i am trying to give spacing between the views in a linearlayout programatically , i tried with
layout.setPadding(0, 5, 0, 5); but nothing worked ..also iam trying to put more space in one edittext field ..tried with this

comment.setLayoutParams(newandroid.view.ViewGroup.LayoutParams(450,100));

//comment.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));

here is my code: http://pastebin.com/s46qQUNV

  • 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-13T23:28:10+00:00Added an answer on June 13, 2026 at 11:28 pm

    Try to using LayoutParams :

    LinearLayout.LayoutParams params = new LinearLayout.LayoutParams
                         (LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT, 1f);
    params.setMargins(10, 0, 10, 0);
    layout.setLayoutParams(params);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to give my UILabel dynamic height so that my layout of
I'm trying to give OrientDB a go on Windows, but I can't even seem
I'm trying to give a model to the shared layout so the menu links
I'm trying to give my search bar a background, using css. But chrome keeps
i am trying to give a two digit space between label and textbox both
I'm trying to give even spacing all around images I have in a table,
I'm trying to give a bold font to an input this way below but
I am trying to give a text input a drop-shadow & a inner shadow,
I'm trying to give functionality to the user where they can remotely control the
I am trying to give sudo access to one of my users. What should

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.