Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to design a label in a .axml layout on C# WPF.

Here is a before an after picture of what I want the label to look like:

Before/After - Album on Imgur[^]

Here is my code:

<LinearLayout
            android:orientation="horizontal"
            android:minWidth="25px"
            android:minHeight="25px"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/linearLayout1"
            android:layout_margin="2dp">

            <TextView
                android:id="@+id/TextView_PalletID"
                android:layout_height="wrap_content"
                android:drawablePadding="1dp"                
                android:gravity="center"
                android:text="F.1234.456.789"
                android:textColor="@color/black"
                style="@style/ECSmallTextBold"
                android:layout_weight="2"
                android:layout_width="400dp"
                android:layout_gravity="center_vertical" />
            <TextView
                android:id="@+id/TextView1"
                android:layout_height="wrap_content"
                android:drawablePadding="10dp"
                android:gravity="right|center"
                android:text="Supervisor:"
                android:textColor="@color/black"
                style="@style/ECSmallText"
                android:layout_width="105dp"
                android:layout_gravity="center_vertical" />
            <TextView
                android:id="@+id/TextView_FieldSupervisor"
                android:layout_height="wrap_content"
                android:drawablePadding="1dp"
                android:layout_marginLeft="15dp"
                android:gravity="center|left"
                android:text="XXX"
                android:textColor="@color/black"
                style="@style/ECSmallTextBold"
                android:layout_width="wrap_content"
                android:layout_gravity="center_vertical" />
        </LinearLayout>


I cannot get the "Supervisor" to align underneath the "Arrival Temp" and across from the product code.

What I have tried:

I have tried changing the "Supervisor" "
android:layout_width="105dp"
" but it just seems to move the product code.
Posted
Updated 11-Aug-21 1:56am
Comments
[no name] 11-Aug-21 11:43am    
Your "XAML" doesn't match your picture ... there is "Driver" in the image and nowhere else. Looks like a "gravity" thing relative to other gravity things.

(I use the term XAML loosely, because it's a lot more wordy than "normal" XAML)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900