Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc98fdf4 authored by Mark Roberts's avatar Mark Roberts Committed by Josh Guilfoyle
Browse files

Adding 2 text fields to the right side of the ListItemIconTwinLabelSecondaryText widget

parent 391dc611
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ public class ListItemIconTwinLabelSecondaryText extends LinearLayout {
	private ImageView mImage2;
	private ImageView mImage3;
	private ImageView mImage4;
	private TextView mRightItemLabel;
    private TextView mRightItemLabel2;
	
	public ListItemIconTwinLabelSecondaryText(Context context) {
		this(context, null);
@@ -46,7 +48,7 @@ public class ListItemIconTwinLabelSecondaryText extends LinearLayout {
        mItemLabel2 = (TextView)findViewById(R.id.itemLabel2Text);
		String item1Text = a.getString(R.styleable.ListItemLayout_itemLabel2Text);
        if (item1Text != null) {
        	mItemLabel2.setText(labelText);
        	mItemLabel2.setText(item1Text);
        }
        
        mImage1 = (ImageView)findViewById(R.id.icon1);
@@ -73,6 +75,18 @@ public class ListItemIconTwinLabelSecondaryText extends LinearLayout {
        	mImage4.setImageDrawable(imageSrc);
        }
        
        mRightItemLabel = (TextView)findViewById(R.id.itemRightLabelText);
        String rightLabelText = a.getString(R.styleable.ListItemLayout_itemLabelText);
//        if (rightLabelText != null) {
        mRightItemLabel.setText("Test");
//        }
        
        mRightItemLabel2 = (TextView)findViewById(R.id.itemRightLabel2Text);
        String rightItem1Text = a.getString(R.styleable.ListItemLayout_itemLabel2Text);
//        if (rightItem1Text != null) {
        mRightItemLabel2.setText("Test");
//        }
        
        a.recycle();
	}

+56 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
        <TextView
            android:id="@+id/itemLabelText"
            android:layout_height="wrap_content"
            android:layout_width="fill_parent"
            android:layout_width="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLabelListItemTextSmall"
            android:layout_marginBottom="0sp"
            android:gravity="left"
@@ -47,6 +47,18 @@
            android:layout_alignTop="@id/itemLabelText"
            android:layout_height="16sp"
            android:layout_width="16sp" />
        <TextView
            android:id="@+id/itemRightLabelText"
            android:layout_height="wrap_content"
            android:layout_width="fill_parent"
            android:layout_alignParentRight="true"
            android:layout_alignTop="@id/itemLabelText"
            android:textAppearance="?android:attr/textAppearanceLabelListItemTextSmall"
            android:layout_marginBottom="0sp"
            android:gravity="right"
            android:lines="1"
            android:scrollHorizontally="false"
            android:ellipsize="end" />
        <ImageView
            android:id="@+id/icon3"
            android:layout_alignLeft="@id/itemLabelText"
@@ -68,5 +80,48 @@
            android:scrollHorizontally="true"
            android:ellipsize="end"
            android:lines="1" />
       <TextView
            android:id="@+id/itemRightLabel2Text"
            android:layout_height="wrap_content"
            android:layout_width="fill_parent"
            android:textAppearance="?android:attr/textAppearanceLabelListItemSecondaryText"
            android:layout_alignParentRight="true"
            android:layout_alignBottom="@id/itemLabel2Text"
            android:layout_marginTop="1sp"
            android:gravity="right"
            android:scrollHorizontally="false"
            android:ellipsize="end"
            android:lines="1" />
    </RelativeLayout>
    <!-- Column 3 (RelativeLayout) 
    <RelativeLayout
        android:id="@+id/row_column_3"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_marginLeft="10sp"
        android:layout_toRightOf="@id/row_column_2"
        android:layout_marginRight="10sp">
        <TextView
            android:id="@+id/itemRightLabelText"
            android:layout_height="wrap_content"
            android:layout_width="fill_parent"
            android:textAppearance="?android:attr/textAppearanceLabelListItemTextSmall"
            android:layout_marginBottom="0sp"
            android:gravity="right"
            android:lines="1"
            android:scrollHorizontally="false"
            android:ellipsize="end" />
        <TextView
            android:id="@+id/itemRightLabel2Text"
            android:layout_height="wrap_content"
            android:layout_width="fill_parent"
            android:textAppearance="?android:attr/textAppearanceLabelListItemSecondaryText"
            android:layout_below="@id/itemRightLabelText"
            android:layout_marginTop="1sp"
            android:gravity="right"
            android:scrollHorizontally="false"
            android:ellipsize="end"
            android:lines="1" />
    </RelativeLayout>-->
</merge>
 No newline at end of file