A
Andro-medanebel
Neues Mitglied
- 0
Ich versuche meine Anwendung um ein Custom View zu erweitern, was jedoch zu dem Laufzeitfehler
"Die Anwendung ... wurde unerwartet beendet." führt. Ohne Custom View läuft meine Anwendung fehlerfrei:
Meine main.xml:
Mein package com.customview:
Meine Pacakage-Struktur:
Warum bekomme ich einen "Die Anwendung wurde unerwartet beendet"-Fehler und wie kann ich meinen Code korrigieren?
"Die Anwendung ... wurde unerwartet beendet." führt. Ohne Custom View läuft meine Anwendung fehlerfrei:
Meine main.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.customview.CustomLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/custom_layout_id"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_id"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:id="@+id/text_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
</RelativeLayout>
</com.customview.CustomLayout>
Code:
...
public class CustomLayout extends RelativeLayout{
...}
...
Code:
com
customview
CustomLayout.java
memory
MemoryActivity.java