I have 3 values displayed consecutively on the screen and I need to add 2-3 vertical separator lines between all of them.The issue is everytime I add a view/ divider between them they shift to the left or right way too much and some values cut off/ disappear. I was wondering if there is a way to go abotu it, below is my xml code for the same:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:foo="http://schemas.android.com/apk/res/com.justin.abc"
android:layout_width="20dp"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingBottom="8dp"
android:paddingLeft="20dp"
android:paddingTop="8dp" >
<LinearLayout
android:id="@+id/layout1"
android:layout_width="2dp"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<com.justin.abc.utils.FontView
android:id="@+id/symbol"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="3dp"
android:textColor="@color/white"
android:textSize="12sp"
foo:customFont="Roboto-Bold.ttf" />
<com.justin.abc.utils.FontView
android:id="@+id/arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
foo:customFont="Roboto-Bold.ttf" />
</LinearLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/value1_back"
style="@style/abc.TextView.ListsTextView.Header"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="3dp"/>
<com.justin.abc.utils.FontView
android:id="@+id/change"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
foo:customFont="Roboto-Bold.ttf" />
</FrameLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/layout2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<com.justin.abc.utils.FontView
android:id="@+id/symbol2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="3dp"
android:textColor="@color/white"
android:textSize="12sp"
foo:customFont="Roboto-Bold.ttf" />
<com.justin.abc.utils.FontView
android:id="@+id/dashboard_markets_arrow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
foo:customFont="Roboto-Bold.ttf" />
</LinearLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/value2_back"
style="@style/abc.TextView.ListsTextView.Header"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="3dp"/>
<com.justin.abc.utils.FontView
android:id="@+id/change2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
foo:customFont="Roboto-Bold.ttf" />
</FrameLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/layout3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<com.justin.abc.utils.FontView
android:id="@+id/dashboard_markets_symbol3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="3dp"
android:textColor="@color/white"
android:textSize="12sp"
foo:customFont="Roboto-Bold.ttf" />
<com.justin.abc.utils.FontView
android:id="@+id/dashboard_markets_arrow3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
foo:customFont="Roboto-Bold.ttf" />
</LinearLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/value3_back"
style="@style/abc.TextView.ListsTextView.Header"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="3dp"/>
<com.justin.abc.utils.FontView
android:id="@+id/change3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
foo:customFont="Roboto-Bold.ttf" />
</FrameLayout>
</LinearLayout>
</LinearLayout>
Do I need to add a layer or something in the background for it to support the same or do I need to change this structure? Thanks! Justin
even after adding android:gravity="center" I still see the same results