<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    android:layout_marginTop="10dp"
    android:layout_marginLeft="10dp"
    android:layout_marginRight="10dp"
    android:background="@drawable/bg_object_item"
    android:weightSum="6">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_weight="5">

        <TextView
            android:id="@+id/object_name"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="object Name" />

        <TextView
            android:id="@+id/object_type"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:text="object Type" />

    </LinearLayout>

    <ToggleButton android:id="@+id/objectState"
        android:layout_width="50dp"
        android:layout_height="wrap_content"
        android:layout_gravity="right"
        android:textColor="@android:color/white"
        android:background="@color/colorPrimary"
        android:layout_weight="1"
        android:textOff="Off"
        android:textOn="On"/>


</LinearLayout><!-- From: file:/D:/Mes%20documents/Aymen/Freelance/smart%20house/SmartHouse/app/src/main/res/layout/list_object_state_row.xml -->