powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Программирование [игнор отключен] [закрыт для гостей] / xml android sl4a
3 сообщений из 3, страница 1 из 1
xml android sl4a
    #37911905
Програмёр
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Всем привет.
Есть проблема, начал учить питон, и что бы время не тратить делаю это вдороге на телефоне. Использую sl4a. Недавно в неё добавили возможность создание интерфейсов через xml. Так вот, проблема в том, что у меня аттрибуты элементов не видит. Создаёт их без текста и не выставляя им ширину и высоту. Подскажите, плиз, может это я где-то туплю. Всем спасибо
Код: xml
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
<?xml version=" 1.0 " encoding=" utf- 8 "?>
<LinearLayout xmlns:android=" http://schemas.android.com/apk/res/android"
android:id = "@+id/background"
android:orientation ="vertical" android:layout_width = "match_parent"
android:layout_height = "match_parent" android:background = "#ff000000" >
<LinearLayout android:layout_width ="match_parent"
android:layout_height = "wrap_content" android:id = "@+id/linearLayout1" >
<Button android:id ="@+id/button1" android:layout_width = "fill_parent"
android:layout_height ="wrap_content" android:text= "Test 1" ></Button>
<Button android:id ="@+id/button2" android:layout_width = "wrap_content"
android:layout_height ="wrap_content" android:text= "Ok" ></Button>
<Button android:id ="@+id/button3" android:layout_width = "wrap_content"
android:layout_height ="wrap_content" android:text= "Cancel" ></Button>
</LinearLayout>
<TextView android:layout_width="match_parent"
android:layout_height="wrap_content" android:text="TextView"
android:id="@+id/textView1 " android:textAppearance="?android:attr/textAppearanceLarge" android:gravity="center_vertical|center_horizontal|center"></TextView>
<EditText android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/editText1"
android:tag="Tag Me" android:inputType="textCapWords|textPhonetic|number">
<requestFocus></requestFocus>
</EditText>
<CheckBox android:layout_height="wrap_content" android:id="@+id/checkBox1" android:layout_width="234dp" android:text="Howdy , neighbors ." android:checked="" />
</LinearLayout> 
...
Рейтинг: 0 / 0
xml android sl4a
    #37912509
Програмёр
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Код: xml
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
<?xml version=" 1.0 " encoding=" utf- 8 "?>
<LinearLayout xmlns:android=" http://schemas.android.com/apk/res/android"
android:id = "@+id/background"
android:orientation ="vertical" android:layout_width = "match_parent"
android:layout_height = "match_parent" android:background = "#ff000000" >
    <LinearLayout android:layout_width ="match_parent"
    android:layout_height = "wrap_content" android:id = "@+id/linearLayout1" >
        <Button android:id ="@+id/button1" android:layout_width = "fill_parent"
        android:layout_height ="wrap_content" android:text= "Test 1" ></Button>
        <Button android:id ="@+id/button2" android:layout_width = "wrap_content"
        android:layout_height ="wrap_content" android:text= "Ok" ></Button>
        <Button android:id ="@+id/button3" android:layout_width = "wrap_content"
        android:layout_height ="wrap_content" android:text= "Cancel" ></Button>
    </LinearLayout>
    <TextView android:layout_width="match_parent"
    android:layout_height="wrap_content" android:text="TextView"
    android:id="@+id/textView1 " android:textAppearance="?android:attr/textAppearanceLarge"
    android:gravity="center_vertical|center_horizontal|center"></TextView>
    <EditText android:layout_width="match_parent"
    android:layout_height="wrap_content" android:id="@+id/editText1"
    android:tag="Tag Me" android:inputType="textCapWords|textPhonetic|number">
        <requestFocus></requestFocus>
    </EditText>
    <CheckBox android:layout_height="wrap_content" android:id="@+id/checkBox1" android:layout_width="234dp" android:text="Howdy , neighbors ." android:checked="" />
</LinearLayout>



Подскажите хотя бы, в xml ошибка какая-нить есть? или он полностью валидный и дело в чём-то другом?
...
Рейтинг: 0 / 0
xml android sl4a
    #37912800
Програмёр
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Код: xml
1.
 xmlns:android=" http://schemas.android.com/apk/res/android" 


Нашёл, всё дело в пробеле перед ссылкой. Чёто не обратил внимание, пока валидатор на w3c не заругался
...
Рейтинг: 0 / 0
3 сообщений из 3, страница 1 из 1
Форумы / Программирование [игнор отключен] [закрыт для гостей] / xml android sl4a
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]