Note that there are some explanatory texts on larger screens.

plurals
  1. POAligning margins correctly in android layout
    text
    copied!<p>Given below is the screenshot of my screen which contains a progressbar. As you can see from the screen, the spacing between the left and right of the screens and this progressbar is not equal. It is less towards the right. How can I make this the same as the left with less gap?</p> <p>Any help is appreciated</p> <p>Code and screenshot below:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;TableRow xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" &gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="match_parent" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/textViewContent" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/blue" android:textSize="18sp" /&gt; &lt;TextView android:id="@+id/textLink" android:layout_width="300dp" android:layout_height="wrap_content" android:textSize="16sp" /&gt; &lt;ProgressBar android:id="@+id/progressBar" style="?android:attr/progressBarStyleHorizontal" android:layout_width="fill_parent" android:layout_height="10dp" android:progressDrawable="@drawable/green_progress_color" /&gt; &lt;/LinearLayout&gt; &lt;/TableRow&gt; </code></pre> <p><strong>EDIT</strong></p> <p>Main Layout </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; </code></pre> <p></p> <pre><code>&lt;LinearLayout android:id="@+id/bottom_layout_installing" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:orientation="vertical" &gt; &lt;TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:text="@string/total_progress" /&gt; &lt;ProgressBar android:id="@+id/total_installed_package_installer" style="?android:attr/progressBarStyleHorizontal" android:layout_width="match_parent" android:layout_height="25dp" android:layout_margin="10dp" /&gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:padding="10dp" &gt; &lt;Button android:id="@+id/buttonAbort" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:background="@drawable/button_bg" android:onClick="onAbortClick" android:text="@string/abort" android:textColor="@android:color/white" /&gt; &lt;Button android:id="@+id/buttonLaunch" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:background="@drawable/button_bg" android:text="@string/install" android:textColor="@android:color/white" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;ScrollView android:id="@+id/layout" android:layout_width="match_parent" android:layout_height="fill_parent" android:layout_above="@id/bottom_layout_installing" &gt; &lt;TableLayout android:id="@+id/installingListview" style="@android:color/white" android:layout_width="wrap_content" android:layout_height="wrap_content" android:groupIndicator="@android:color/transparent" android:listSelector="@android:color/transparent" &gt; &lt;/TableLayout&gt; &lt;/ScrollView&gt; </code></pre> <p></p> <p><img src="https://i.stack.imgur.com/yXanT.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload