خرید بک لینک

Vote count: 1

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 enter image description here.

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>

asked 29 secs ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 5 مرداد 1395 ساعت: 15:51

صفحه بندی