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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:12:40+00:00 2026-06-10T18:12:40+00:00

I add a graphview programatically : LinearLayout.LayoutParams Lparams = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, p.y/2); //same result

  • 0

I add a graphview programatically :

    LinearLayout.LayoutParams Lparams = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, p.y/2);

//same result with fill_parent or match_parent

    Lparams.gravity = Gravity.LEFT;

    firstGraph.setPadding(10, 0, 10, 0);

    firstGraph.setLayoutParams(Lparams);

    LinearLayout RelLayout = (LinearLayout) findViewById(R.id.relLayout);

    RelLayout.setGravity(Gravity.LEFT);
    RelLayout.addView(firstGraph, 0);

I obtain this:
Problem

What i want is to eliminate that left gap of the graphview, I don’t know why is there, I only set a padding of 10 that is what you have in right side.

Any Suggestions? Thansk in advance.

the layout xml:

            <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/relLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="left"
        android:orientation="vertical" >

<Button
    android:id="@+id/button3"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Button" />



</LinearLayout>
  • 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-10T18:12:42+00:00Added an answer on June 10, 2026 at 6:12 pm

    That space most likely appears because it is the space reserved for the axis labels(and as you probably don’t set any labels it’s an empty space). If you do need to remove it you’ll have to modify the graph view’s code and change the values in GraphViewConfig(as those seem to be the values used).

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

Sidebar

Related Questions

I add a EditText into a Linearlayout, for each ,I set a picture as
To add a new pair to Hash I do: {:a => 1, :b =>
Add a frame to the page Remove it Add another frame with the same
// Add into DB using (tblArtworkTemplatesTableAdapter tblAdapter = new tblArtworkTemplatesTableAdapter()) { tblAdapter.Insert(DateTime.Now, @specID); @specID
I'm trying to create my first custom View subclass GraphView and add it to
add(new CustomLabelField (Please enter your credentials:, Color.WHITE, 0x999966, 0)); What is that 0x999966? I
I add my url xxx/getjson.php to a webhook and once a person signup, it
The .add method appends components to the end of another component. I'm trying to
I add webview and navigationbar inside my view controller . Web view is display
Please add an SSH key before provisioning a machine. I am trying to create

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.