My problem is that i want to overlap two TextViews in a LinearLayout. On smartphone looks alright, but on tablet the negative margin gives me a hard time.
This is the layout i want to obtain
.
And here is the code. How can i modify it so i can overlap one text view on the upper right part of the other text view without using negative margin?
<FrameLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@drawable/bottom_bar_back_with_arrow"
android:layout_weight="1">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center">
<com.dyve.counting.widget.DVTextView
android:id="@+id/txtToggleNumbers"
style="@style/BottomBarButton"
android:layout_weight="1"
android:background="@drawable/bottom_bar_back"/>
<com.dyve.counting.widget.DVTextView
android:id="@+id/mShowHideScale"
style="@style/BottomBarButton"
android:layout_weight="1"
android:drawableTop="@drawable/show_calibrate_tool"
android:text="Calibrate" />
<TextView
android:id="@+id/badgeRadius"
android:layout_width="14dip"
android:layout_height="14dip"
android:textColor="@color/primary_color"
android:textStyle="bold"
android:gravity="center"
android:background="@drawable/shape_notification"
android:layout_marginLeft="-18dp"
android:layout_marginTop="-27dp"/>
</LinearLayout>
</FrameLayout>
