比率変更

最後の手段。

前回はこちら。

 kindleは読み返しにくくて効率が悪いので、結局紙の本買いました。


 間違っている箇所がどうしてもわからなかったので、それ以前にも間違った部分があったようで表示がおかしかったこともあり、最後の手段に出ます。すなわち「全部消して最初からベタ打ち」です。

消す前のactivity_view_sample.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="#A1A9BA"
    android:orientation="vertical"
    android:text="@string/bt_save">

<TextView
    android:id="@+id/tvLabelInput"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginBottom="10dp"
    android:layout_marginTop="5dp"
    android:background="#ffffff"
    android:text="@string/tv_msg"
    android:textSize="25sp"/>

    <EditText
        android:id="@+id/etInput"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="25dp"
        android:layout_marginTop="5dp"
        android:background="#ffffff"
        android:inputType="text"/>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#df7401"
        android:orientation="horizontal">

        <CheckBox
            android:id="@+id/cdDrink"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="25dp"
            android:background="#ffffff"
            android:text="@string/cd_drink"/>

        <CheckBox
            android:id="@+id/cdFood"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#ffffff"
            android:text="@string/cd_food"/>

    </LinearLayout> 

    <RadioGroup
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginTop="10dp"
        android:background="#df7401"
        android:orientation="horizontal"
        android:paddingBottom="10dp"
        android:paddingTop="10dp">

        <RadioButton
            android:id="@+id/rdMale"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="25dp"
            android:layout_marginRight="25dp"
            android:background="#ffffff"
            android:text="@string/rd_male"/>

        <RadioButton
            android:id="@+id/rdFemale"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#ffffff"
            android:text="@string/rd_female"/>

    </RadioGroup>

        <Spinner
            android:id="@+id/spCurryList"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#ffffff"
            android:entries="@array/sp_currylist"
            android:paddingBottom="5dp"
            android:paddingTop="5dp"/>

<Button
        android:id="@+id/btSave"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/bt_save" />

    <ListView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:background="#ffffff"
        android:entries="@array/lv_cocktaillist"/>
</LinearLayout>

 でのデザインモードの表示がこちら。

 何とかここまでは修正したんですよ。何が違ったのかいまいちよくわかっていませんけれども。ドリンク/フードの背景と位置がおかしいし、リストの内容が表示されていません。直るといいのですが……

 それで、改めて打ち込んだのがこちら。どこか違うのか……???って、結構違いますね(汗

<?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="#A1A9BA"
    android:orientation="vertical">

    <TextView
    android:id="@+id/tvLabelInput"
    android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginTop="5dp"
        android:background="#ffffff"
        android:text="@string/tv_msg"
        android:textSize="25sp"/>

    <EditText
        android:id="@+id/etInput"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="25dp"
        android:layout_marginTop="5dp"
        android:background="#ffffff"
        android:inputType="text"/>

<LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#df7401"
        android:orientation="horizontal">

        <CheckBox
            android:id="@+id/cbDrink"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="25dp"
            android:background="#ffffff"
            android:text="@string/cb_drink"/>

        <CheckBox
            android:id="@+id/cbFood"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#ffffff"
            android:text="@string/cb_food"/>

</LinearLayout>

    <RadioGroup
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:layout_marginTop="10dp"
        android:background="#df7401"
        android:orientation="horizontal"
        android:paddingBottom="10dp"
        android:paddingTop="10dp">

        <RadioButton
            android:lid="@+id/rdMale"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="25dp"
            android:layout_marginRight="25dp"
            android:background="#ffffff"
            android:text="@string/rd_male"/>

        <RadioButton
            android:id="@+id/rdFemale"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#ffffff"
            android:text="@string/rd_female"/>
    </RadioGroup>

<Spinner
    android:id="@+id/spCurryList"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="#ffffff"
    sp_currylist
    android:paddingBottom="5dp"
    android:paddingTop="5dp"/>

</Spinner>

    <Button
        android:id="@+id/btSave"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/bt_save"/>

<ListView
  android:layout_width="match_parent"
  android:layout_height="0dp"
  android:background="#ffffff"
  android:entries="@array/lv_cocktaillist">

    </LinearLayout>

そしてその結果ですが……

orz


 前よりひどくなっている気が……下の文字が解決のヒントになるのでしょうか?前途多難と辞書で引けば、用例に私のことが載っているかもしれません。嘘です載ってません。エミュレータも直ってません。

つづく!

ここから先は

0字

¥ 100

期間限定 PayPay支払いすると抽選でお得に!

この記事が気に入ったらサポートをしてみませんか?