Hirdetés

Új hozzászólás Aktív témák

  • lanszelot
    addikt

    Ezt nézd meg egyszer, (bocs a külső hivatkozásokat kivettem)

    <?xml version="1.0" encoding="utf-8"?>
    <ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context=".MainActivity"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

    <EditText
    android:id="@+id/name"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="hint_name"
    android:inputType="textPersonName"
    android:maxLength="99"
    android:singleLine="true" />

    <Button
    android:id="@+id/saveButton"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="save" />
    </LinearLayout>

    </ScrollView>

    Még van egy olyan, hogy: android:fillViewport="true" a scroll részen belül, de nem tudom, hogy egyetlen soros szövegnél van-e hatása.
    A RelativeLayout-nak egyetlen ablaknál (egyetlen child-view-nál) nincs szerepe, az kivehető. És ki kell venni az összes ez-alá, e-fölé dolgot is. Itt uis. van egy scrollview, ami egyetlen "ablakot" (child-view-t) képes kezelni, ami a LinearLayout, ami viszont a benne lévőket csak egymás alatt bemutatja.

    Most ezzel a két sorral van baja:

    android:id="@+id/saveButton"

    és a

    android:text="save" />

    alsónál a "save" ra ha ráviszem az egeret ezt írja ki:

    [I18N] Hardcoded string "save", should use @string resource less... (⌘F1)
    Hardcoding text attributes directly in layout files is bad for several reasons: * When creating configuration variations (for example for landscape or portrait)you have to repeat the actual text (and keep it up to date when making changes) * The application cannot be translated to other languages by just adding new translations for existing string resources. In Android Studio and Eclipse there are quickfixes to automatically extract this hardcoded string into a resource lookup.

Új hozzászólás Aktív témák