Android超过80次查看

时间:2014-07-17 14:04:49

标签: android

我对我的警告有疑问。 我几天前开始创建我的第一个Android应用程序。然而今天我遇到了超过80个观看次数和#39;警告。因为我必须在我的设计中创建表,所以我必须使用许多不同的视图来制作这些表,就像我在XML代码中看到的那样。我确实搜索了一段时间,但我似乎无法为我的问题找到合适的解决方案。我确实考虑在活动本身上使用片段,但是我不确定这对我来说是否是正确的解决方案。我希望你能把我推向正确的方向,谢谢!

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:scrollbars="none"
        android:fillViewport="true"
        android:id="@+id/scrollView">
<LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:weightSum="1"
        android:padding="2dp"
        android:baselineAligned="false"
        android:id="@+id/linearLayout">
    <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/headingName_rideheight"
            style="@style/textHeadingStyle"/>
    <View
            android:layout_width="fill_parent"
            android:layout_height="2dp"
            android:layout_marginTop="2dp"
            android:background="#ffff3bb2"/>
    <ImageView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:id="@+id/imageView"
            android:adjustViewBounds="true"
            android:scaleType="fitXY"
            android:src="@drawable/rideheight_en"
            android:contentDescription="@string/imageDescription_rideheight"
            android:layout_marginTop="10dp"/>
    <TextView
            android:text="@string/subheadingName_overview"
            style="@style/textSubheadingStyle"/>
    <TextView
            android:text="@string/summary_rideheight"
            android:id="@+id/textView"
            style="@style/textSummaryStyle"/>
    <TableRow
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/ride_height_summary_expand_button"
            android:layout_marginTop="5dp"
            android:id="@+id/tableRow">
        <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:layout_gravity="center"
                android:textColor="#ffffffff"
                android:textStyle="bold"
                android:textSize="12sp"
                android:text="@string/showMore"
                android:id="@+id/textView2"/>
        <ImageView
                android:layout_width="15dp"
                android:layout_height="15dp"
                android:layout_marginLeft="5dp"
                android:id="@+id/imageView2"
                android:src="@drawable/arrow_button_down"
                android:adjustViewBounds="true"
                android:contentDescription="@string/imageDescription_arrow_button"/>
    </TableRow>
    <View
            android:layout_width="fill_parent"
            android:layout_height="1dp"
            android:layout_marginTop="10dp"
            android:background="#ffff3bb2"/>
    <View
            android:layout_width="fill_parent"
            android:layout_height="1dp"
            android:layout_marginTop="2dp"
            android:background="#ffff3bb2"/>
    <TextView
            android:text="@string/subheadingNameEffects_rideheight"
            style="@style/textSubheadingStyle"/>
    <TableLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/table_layout_border"
            android:layout_marginTop="10dp">
        <TableRow
                style="@style/contentTableRowStyle">
            <TextView
                    android:text="@string/tableContentEffects_rideheight"
                    style="@style/tableContentStyle_2"/>
            <View
                    android:layout_width="1dp"
                    android:layout_height="fill_parent"
                    android:background="#ff000000"/>

            <TableLayout
                    style="@style/contentTableLayoutStyle">
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentEffects_rideheight_2"
                            style="@style/tableContentStyle"/>
                </TableRow>
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentEffects_rideheight_3"
                            style="@style/tableContentStyle"/>
                </TableRow>
            </TableLayout>
        </TableRow>
        <View
                android:layout_width="fill_parent"
                android:layout_height="1dp"
                android:background="#ff000000"/>
        <TableRow
                style="@style/contentTableRowStyle">
            <TextView
                    android:text="@string/tableContentEffects_rideheight_4"
                    style="@style/tableContentStyle_2"/>
            <View
                    android:layout_width="1dp"
                    android:layout_height="fill_parent"
                    android:background="#ff000000"/>

            <TableLayout
                    style="@style/contentTableLayoutStyle">
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentEffects_rideheight_5"
                            style="@style/tableContentStyle"/>
                </TableRow>
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentEffects_rideheight_t6"
                            style="@style/tableContentStyle"/>
                </TableRow>
            </TableLayout>
        </TableRow>
        <View
                android:layout_width="fill_parent"
                android:layout_height="1dp"
                android:background="#ff000000"/>
        <TableRow
                style="@style/contentTableRowStyle">
            <TextView
                    android:text="@string/tableContentEffects_rideheight_7"
                    style="@style/tableContentStyle_2"/>
            <View
                    android:layout_width="1dp"
                    android:layout_height="fill_parent"
                    android:background="#ff000000"/>
            <TableLayout
                    style="@style/contentTableLayoutStyle">
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentEffects_rideheight_8"
                            style="@style/tableContentStyle"/>
                </TableRow>
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentEffects_rideheight_9"
                            style="@style/tableContentStyle"/>
                </TableRow>
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentEffects_rideheight_10"
                            style="@style/tableContentStyle"/>
                </TableRow>
            </TableLayout>
        </TableRow>
        <View
                android:layout_width="fill_parent"
                android:layout_height="1dp"
                android:background="#ff000000"/>
        <TableRow
                style="@style/contentTableRowStyle">
            <TextView
                    android:text="@string/tableContentEffects_rideheight_11"
                    style="@style/tableContentStyle_2"/>
            <View
                    android:layout_width="1dp"
                    android:layout_height="fill_parent"
                    android:background="#ff000000"/>
            <TableLayout
                    style="@style/contentTableLayoutStyle">
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentEffects_rideheight_12"
                            style="@style/tableContentStyle"/>
                </TableRow>
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentEffects_rideheight_13"
                            style="@style/tableContentStyle"/>
                </TableRow>
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentEffects_rideheight_14"
                            style="@style/tableContentStyle"/>
                </TableRow>
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentEffects_rideheight_15"
                            style="@style/tableContentStyle"/>
                </TableRow>
            </TableLayout>
        </TableRow>
    </TableLayout>
    <View
            android:layout_width="fill_parent"
            android:layout_height="1dp"
            android:layout_marginTop="10dp"
            android:background="#ffff3bb2"/>
    <View
            android:layout_width="fill_parent"
            android:layout_height="1dp"
            android:layout_marginTop="2dp"
            android:background="#ffff3bb2"/>
    <TextView
            android:text="@string/subheadingNameMeasuring_rideheight"
            style="@style/textSubheadingStyle"/>
    <TableLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/table_layout_border"
            android:layout_marginTop="10dp">
        <TableRow
                style="@style/contentTableRowStyle">
            <TextView
                    android:text="@string/tableContentMeasuring_initial_steps"
                    style="@style/tableContentStyle_3"/>
            <View
                    android:layout_width="1dp"
                    android:layout_height="fill_parent"
                    android:background="#ffffffff"/>
            <TextView
                    android:text="@string/tableContentMeasuring_setup_components"
                    style="@style/tableContentStyle_3"/>

        </TableRow>

        <TableRow
                style="@style/contentTableRowStyle">
            <TextView
                    android:text="@string/tableContentMeasuring_prepare_car"
                    style="@style/tableContentStyle_2"/>
            <View
                    android:layout_width="1dp"
                    android:layout_height="fill_parent"
                    android:background="#ff000000"/>
            <TextView
                    android:text="@string/tableContentMeasuring_use_setup_components"
                    style="@style/tableContentStyle_2"/>
        </TableRow>
        <View
                android:layout_width="fill_parent"
                android:layout_height="1dp"
                android:background="#ff000000"/>
        <TableRow
                style="@style/contentTableRowStyle">
            <TableLayout
                    style="@style/contentTableLayoutStyle">
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentMeasuring_rideheight"
                            style="@style/tableContentStyle"/>
                </TableRow>
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentMeasuring_rideheight_2"
                            style="@style/tableContentStyle"/>
                </TableRow>
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentMeasuring_rideheight_3"
                            style="@style/tableContentStyle"/>
                </TableRow>
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentMeasuring_rideheight_4"
                            style="@style/tableContentStyle"/>
                </TableRow>
            </TableLayout>
            <View
                    android:layout_width="1dp"
                    android:layout_height="fill_parent"
                    android:background="#ff000000"/>

            <TableLayout
                    style="@style/contentTableLayoutStyle">
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentMeasuring_rideheight_5"
                            style="@style/tableContentStyle"/>
                </TableRow>
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="•"
                            style="@style/tableContentDotStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentMeasuring_rideheight_6"
                            style="@style/tableContentStyle"/>
                </TableRow>
            </TableLayout>
        </TableRow>
    </TableLayout>
    <TableLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp">
        <TableRow
                style="@style/contentTableRowStyle">
            <TableLayout
                    style="@style/contentTableLayoutStyle_2">
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="1."
                            style="@style/tableContentNumberStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentMeasuring_rideheight_7"
                            style="@style/tableContentStyle_4"/>
                </TableRow>
                <TableRow
                        style="@style/contentTableRowStyle">
                    <TextView
                            android:text="2."
                            style="@style/tableContentNumberStyle"
                            tools:ignore="HardcodedText"/>
                    <TextView
                            android:text="@string/tableContentMeasuring_rideheight_8"
                            style="@style/tableContentStyle_4"/>
                </TableRow>
            </TableLayout>

            <ImageView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:id="@+id/imageView3"
                    android:adjustViewBounds="true"
                    android:scaleType="fitXY"
                    android:src="@drawable/ride_height_step_1_2"
                    android:contentDescription="@string/imageDescription_rideheight_2"/>
        </TableRow>
        <View
                android:layout_width="fill_parent"
                android:layout_height="5dp"
                android:background="#ff000000"/>
        <TableRow
                style="@style/contentTableRowStyle">
            <TableRow
                    style="@style/contentTableRowStyle_2">
                <TextView
                        android:text="3."
                        style="@style/tableContentNumberStyle"
                        tools:ignore="HardcodedText"/>
                <TextView
                        android:text="@string/tableContentMeasuring_rideheight_9"
                        style="@style/tableContentStyle_4"/>
            </TableRow>
            <ImageView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:id="@+id/imageView4"
                    android:adjustViewBounds="true"
                    android:scaleType="fitXY"
                    android:src="@drawable/ride_height_step_3"
                    android:contentDescription="@string/imageDescription_rideheight_3"/>
        </TableRow>
        <View
                android:layout_width="fill_parent"
                android:layout_height="5dp"
                android:background="#ff000000"/>
        <TableRow
                style="@style/contentTableRowStyle">
            <TableRow
                    style="@style/contentTableRowStyle_2">
                <TextView
                        android:text="4."
                        style="@style/tableContentNumberStyle"
                        tools:ignore="HardcodedText"/>
                <TextView
                        android:text="@string/tableContentMeasuring_rideheight_10"
                        style="@style/tableContentStyle_4"/>
            </TableRow>
            <ImageView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:id="@+id/imageView5"
                    android:adjustViewBounds="true"
                    android:scaleType="fitXY"
                    android:src="@drawable/ride_height_step_4"
                    android:contentDescription="@string/imageDescription_rideheight_4"/>
        </TableRow>
        <View
                android:layout_width="fill_parent"
                android:layout_height="5dp"
                android:background="#ff000000"/>
        <TableRow
                style="@style/contentTableRowStyle">
            <TableRow
                    style="@style/contentTableRowStyle_2">
                <TextView
                        android:text="5."
                        style="@style/tableContentNumberStyle"
                        tools:ignore="HardcodedText"/>
                <TextView
                        android:text="@string/tableContentMeasuring_rideheight_11"
                        style="@style/tableContentStyle_4"/>
            </TableRow>
            <ImageView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:id="@+id/imageView6"
                    android:adjustViewBounds="true"
                    android:scaleType="fitXY"
                    android:src="@drawable/ride_height_step_5"
                    android:contentDescription="@string/imageDescription_rideheight_5"/>
        </TableRow>
    </TableLayout>
    <View
            android:layout_width="fill_parent"
            android:layout_height="1dp"
            android:layout_marginTop="10dp"
            android:background="#ffff3bb2"/>
    <View
            android:layout_width="fill_parent"
            android:layout_height="1dp"
            android:layout_marginTop="2dp"
            android:background="#ffff3bb2"/>
</LinearLayout>

此代码会导致此预览:![在此处输入图像说明] [1]

http://foto.modelbouwforum.nl/images/2014/07/17/screenshot.png

1 个答案:

答案 0 :(得分:0)

我要么使用片段,要么内容是静态的,也许是html ..你也应该重新考虑设计..如果你的滚动视图很长而且只是说明它可能不是我们最实用的界面scrollView 。也许是ViewPager或标签。