6
Ustawiłem xml dla tego LinearLayout i chcę dodać do niego kolejny. to pierwszy xml odkształcalne:android- Jak ustawić 2 xml drawable dla LinearLayout
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/blue" android:state_pressed="true"/>
<item android:drawable="@color/blue" android:state_selected="true"/>
<item android:drawable="@color/white"/>
</selector>
Jest to układ xml:
<?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:background="@drawable/bg1"
android:orientation="vertical" >
na tym etapie, chcę dodać obramowanie wokół tego LinearLayout utworzyłem kolejną rozciągliwej układ. jest to kod:
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF"/>
<stroke android:width="3dip" android:color="#B1BCBE" />
<corners android:radius="10dip"/>
<padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" />
</shape>
Jak mogę użyć tych 2 xmlesów na jeden element?
Zrobiłem to, co powiedziałeś, ale jest napisane, że kod jest nieosiągalny i nie zadziałał. w inny sposób? –
Co masz na myśli, gdy kod jest nieosiągalny? Co to jest komunikat o błędzie? – Praveen