小编Nob*_*ody的帖子

为什么这个包含水平线的视图标签会使应用程序崩溃?

当我注释掉视图标签时,应用程序工作正常。当它被包含时它会崩溃。如果有人可以帮助我,我会很高兴。

custom_info_window.xml

 <?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@color/background_marker"
    android:orientation="vertical">

    <TextView
        android:id="@+id/title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:text="@string/distance"
        android:textColor="@color/foreground_marker"
        android:textSize="14dp"
        android:textStyle="bold" />

    <TextView
        android:id="@+id/subtitle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:textColor="@color/foreground_marker"
        android:textSize="14sp" />

    <TextView
        android:id="@+id/snippet"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:textColor="@color/foreground_marker"
        android:textSize="14sp" />

    <view
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="@color/foreground_marker"/>


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

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_custom_info_window" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_alignParentTop="true"
            android:gravity="center"
            android:paddingRight="8dp"
            android:text="@string/custom_marker_remove"
            android:textColor="@color/foreground_marker"
            android:textSize="14sp"
            android:textStyle="italic" />
    </LinearLayout>


</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

安卓监视器中的错误

12-28 00:28:10.580 22344-22344/com.example.nobodyme.buildingareafinder E/dalvikvm: Could not find class 'com.google.android.chimera.Activity', referenced from method lq.b
12-28 00:28:10.771 22344-22344/com.example.nobodyme.buildingareafinder …
Run Code Online (Sandbox Code Playgroud)

xml layout android view horizontal-line

0
推荐指数
1
解决办法
855
查看次数

标签 统计

android ×1

horizontal-line ×1

layout ×1

view ×1

xml ×1