Код в open sorce проекте. Рабочий ли он?
Добавлено: 02 апр 2014, 19:33
Код, представленный ниже - часть одного из опенсорс проектов.
Не понимаю как код, представленный ниже может работать. Ведь у всех ImageView в android:layout_width установленно match_parent, а не wrap_content. Может я что то не понимаю или это ошибка?
Не понимаю как код, представленный ниже может работать. Ведь у всех ImageView в android:layout_width установленно match_parent, а не wrap_content. Может я что то не понимаю или это ошибка?
Код: Выделить всё
<?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="vertical">
...
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.4" >
<ImageView
android:contentDescription="@string/content_description_add_contact"
android:id="@+id/addContact"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:scaleType="fitXY"
android:src="@drawable/add_contact" />
<ImageView
android:id="@+id/Call"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:scaleType="fitXY"
android:src="@drawable/call" />
<ImageView
android:id="@+id/Erase"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:scaleType="fitXY"
android:src="@drawable/backspace" />
</LinearLayout>
...
</LinearLayout>