App wird nicht ausgeführt!

  • Antworten:12
  • OffenNicht stickyNicht beantwortet
  • Forum-Beiträge: 7

17.05.2014, 01:15:56 via Website

Hallo Zusammen,

da dies hier mein erster Beitrag ist bitte ich um Nachsicht bei Fehlern.
Ich bitte um etwas Hilfe beim Einstieg in die Android-Programmierung.

Zu meiner Entwicklungsumgebung:
• Ich nutze Android Studio.
• Ich lasse die App über mein Angeschlossenes Smartphone debuggen.

Und jetzt zum Problem:
• Ich habe das automatisch generierte Projekt getestet, dies hat funktioniert. Auf der AVD und am Smartphone.
• Ich habe ein *.xml Layout erstellt das den S Planner ähnelt. (Dazu hätte ich auch noch eine Frage aber erst mal die App zum laufen bringen.)
• Jetzt starte ich die App und sie wird sowohl auf dem Smartphone als auch auf dem AVD angehalten.

Der logcat:

05-17 00:50:34.300  18343-18343/de.ebelmxi.schichtplan.app I/SELinux﹕ Function: selinux_android_load_priority [0], There is no sepolicy file.
05-17 00:50:34.320  18343-18343/de.ebelmxi.schichtplan.app I/SELinux﹕ Function: selinux_android_load_priority , spota verifySig and checkHash pass. priority version is VE=SEPF_SM-G900F_4.4.2_0015
05-17 00:50:34.320  18343-18343/de.ebelmxi.schichtplan.app I/SELinux﹕ selinux_android_seapp_context_reload: seapp_contexts file is loaded from /data/security/spota/seapp_contexts
05-17 00:50:34.320  18343-18343/de.ebelmxi.schichtplan.app E/dalvikvm﹕ >>>>> Normal User
05-17 00:50:34.320  18343-18343/de.ebelmxi.schichtplan.app E/dalvikvm﹕ >>>>> de.ebelmxi.schichtplan.app [ userId:0 | appId:10210 ]
05-17 00:50:34.320  18343-18343/de.ebelmxi.schichtplan.app D/dalvikvm﹕ Late-enabling CheckJNI
05-17 00:50:34.540  18343-18343/de.ebelmxi.schichtplan.app I/PersonaManager﹕ getPersonaService() name persona_policy
05-17 00:50:34.600  18343-18343/de.ebelmxi.schichtplan.app I/PersonaManager﹕ getPersonaService() name persona_policy
05-17 00:50:34.610  18343-18343/de.ebelmxi.schichtplan.app D/skia﹕ GFXPNG PNG bitmap created width:48 height:48 bitmap id is 270
05-17 00:50:34.620  18343-18343/de.ebelmxi.schichtplan.app E/MoreInfoHPW_ViewGroup﹕ Parent view is not a TextView
05-17 00:50:34.630  18343-18343/de.ebelmxi.schichtplan.app D/skia﹕ GFXPNG PNG bitmap created width:72 height:72 bitmap id is 271
05-17 00:50:34.630  18343-18343/de.ebelmxi.schichtplan.app D/skia﹕ GFXPNG PNG bitmap created width:144 height:144 bitmap id is 272
05-17 00:50:34.640  18343-18343/de.ebelmxi.schichtplan.app I/PersonaManager﹕ getPersonaService() name persona_policy
05-17 00:50:34.650  18343-18343/de.ebelmxi.schichtplan.app D/skia﹕ GFXPNG PNG bitmap created width:17 height:28 bitmap id is 273
05-17 00:50:34.650  18343-18343/de.ebelmxi.schichtplan.app D/skia﹕ GFXPNG PNG bitmap created width:17 height:28 bitmap id is 274
05-17 00:50:34.660  18343-18343/de.ebelmxi.schichtplan.app D/AndroidRuntime﹕ Shutting down VM
05-17 00:50:34.660  18343-18343/de.ebelmxi.schichtplan.app W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x417fbda0)
05-17 00:50:34.670  18343-18343/de.ebelmxi.schichtplan.app E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: de.ebelmxi.schichtplan.app, PID: 18343
    java.lang.RuntimeException: Unable to start activity ComponentInfo{de.ebelmxi.schichtplan.app/de.ebelmxi.schichtplan.app.MainActivity}: android.view.InflateException: Binary XML file line #159: Error inflating class <unknown>
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2328)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386)
            at android.app.ActivityThread.access$900(ActivityThread.java:169)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5476)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: android.view.InflateException: Binary XML file line #159: Error inflating class <unknown>
            at android.view.LayoutInflater.createView(LayoutInflater.java:626)
            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:675)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:700)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:366)
            at android.app.Activity.setContentView(Activity.java:2031)
            at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:216)
            at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:111)
            at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:76)
            at de.ebelmxi.schichtplan.app.MainActivity.onCreate(MainActivity.java:38)
            at android.app.Activity.performCreate(Activity.java:5451)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386)
            at android.app.ActivityThread.access$900(ActivityThread.java:169)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5476)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.reflect.InvocationTargetException
            at java.lang.reflect.Constructor.constructNative(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
            at android.view.LayoutInflater.createView(LayoutInflater.java:600)
            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:675)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:700)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:366)
            at android.app.Activity.setContentView(Activity.java:2031)
            at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:216)
            at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:111)
            at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:76)
            at de.ebelmxi.schichtplan.app.MainActivity.onCreate(MainActivity.java:38)
            at android.app.Activity.performCreate(Activity.java:5451)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386)
            at android.app.ActivityThread.access$900(ActivityThread.java:169)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5476)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: android.content.res.Resources$NotFoundException: File #0000FF from drawable resource ID #0x7f0a0013
            at android.content.res.Resources.loadDrawable(Resources.java:3083)
            at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
            at android.view.View.<init>(View.java:3694)
            at android.view.ViewGroup.<init>(ViewGroup.java:480)
            at android.widget.FrameLayout.<init>(FrameLayout.java:101)
            at android.widget.FrameLayout.<init>(FrameLayout.java:97)
            at java.lang.reflect.Constructor.constructNative(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
            at android.view.LayoutInflater.createView(LayoutInflater.java:600)
            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:675)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:700)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:366)
            at android.app.Activity.setContentView(Activity.java:2031)
            at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:216)
            at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:111)
            at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:76)
            at de.ebelmxi.schichtplan.app.MainActivity.onCreate(MainActivity.java:38)
            at android.app.Activity.performCreate(Activity.java:5451)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386)
            at android.app.ActivityThread.access$900(ActivityThread.java:169)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5476)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.io.FileNotFoundException: #0000FF
            at android.content.res.AssetManager.openNonAssetNative(Native Method)
            at android.content.res.AssetManager.openNonAsset(AssetManager.java:408)
            at android.content.res.Resources.loadDrawable(Resources.java:3074)
            at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
            at android.view.View.<init>(View.java:3694)
            at android.view.ViewGroup.<init>(ViewGroup.java:480)
            at android.widget.FrameLayout.<init>(FrameLayout.java:101)
            at android.widget.FrameLayout.<init>(FrameLayout.java:97)
            at java.lang.reflect.Constructor.constructNative(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
            at android.view.LayoutInflater.createView(LayoutInflater.java:600)
            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:675)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:700)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:769)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:366)
            at android.app.Activity.setContentView(Activity.java:2031)
            at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:216)
            at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:111)
            at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:76)
            at de.ebelmxi.schichtplan.app.MainActivity.onCreate(MainActivity.java:38)
            at android.app.Activity.performCreate(Activity.java:5451)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386)
            at android.app.ActivityThread.access$900(ActivityThread.java:169)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5476)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
            at dalvik.system.NativeStart.main(Native Method)

Die Zeilen um 159 in der XML:

       <FrameLayout
            android:layout_width="50dp"
            android:layout_height="80dp"
            android:layout_column="0"
            android:layout_marginTop="1dp"
            android:layout_marginLeft="1dp"
            android:background="#EEEEEE">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="28"
                android:id="@+id/date00"
                android:layout_gravity="center_horizontal|bottom"
                android:layout_marginBottom="3dp"
                android:textColor="#999999" />

 159       <FrameLayout
                android:layout_width="fill_parent"
                android:layout_height="25dp"
                android:layout_gravity="center_horizontal|top"
                android:background="@string/colorNacht">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/textShiftNacht"
                    android:id="@+id/shift00"
                    android:layout_gravity="center_horizontal|bottom"
                    android:layout_marginBottom="3dp"
                    android:textColor="@string/colorTextShiftNacht" />

            </FrameLayout>
        </FrameLayout>

Dieser Codeschnipsel ist ein Tag der Monatsansicht.

Jetzt hoffe ich auf euere Hilfe ;)
Danke vorab.

— geändert am 17.05.2014, 13:48:24

Antworten
Pascal P.
  • Mod
  • Blogger
  • Forum-Beiträge: 10.174

17.05.2014, 07:36:49 via Website

Ohne Programm Code geht das schlecht.
poste bitte den wichteigen Teil für das Laout Inflating.
PS: Der Fehler Tritt hier auf:

at de.ebelmxi.schichtplan.app.MainActivity.onCreate(MainActivity.java:38)

LG Pascal //It's not a bug, it's a feature. :) ;)

Antworten
  • Forum-Beiträge: 7

17.05.2014, 13:45:58 via Website

Hallo, danke für eure Antworten.

@Pascal:

Hier der Aufruf in der MainActivity.class:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mNavigationDrawerFragment = (NavigationDrawerFragment)
            getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
    mTitle = getTitle();

    // Set up the drawer.
    mNavigationDrawerFragment.setUp(
            R.id.navigation_drawer,
            (DrawerLayout) findViewById(R.id.drawer_layout));
}

@impjor:

Ich ändere meinen Vorherigen post und trage die Zeile 159 ein ;)

Antworten
Pascal P.
  • Mod
  • Blogger
  • Forum-Beiträge: 10.174

17.05.2014, 14:06:16 via Website

Warum müssen die FrameLayouts geschachtelt werden?

LG Pascal //It's not a bug, it's a feature. :) ;)

Antworten
  • Forum-Beiträge: 7

17.05.2014, 14:17:34 via App

Es wäre auch sicher anders zu lösen, denkst du daran könnte es liegen?

War halt meiner Meinung die schönste Lösung.

Antworten
Pascal P.
  • Mod
  • Blogger
  • Forum-Beiträge: 10.174

17.05.2014, 14:18:49 via Website

Keine Ahnung aber schmeiß das mal probehalber rauß um zu sehen ob es daran liegt.

LG Pascal //It's not a bug, it's a feature. :) ;)

Antworten
  • Forum-Beiträge: 7

17.05.2014, 14:56:20 via Website

Ich habe jetzt das Layout mal rausgenommen da funktioniert es.

Also liegt der Fehler definitiv in der XML.

Aber wie sollte ich meinen View anders aufbauen?
Hier mal ein abschnitt meiner eigentlichen XML:

<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
<android.support.v4.widget.DrawerLayout
    xmlns:android="HABE ICH ENTFERNT KANN KEINE LINKS IM FORUM POSTEN"
    xmlns:tools="HABE ICH ENTFERNT KANN KEINE LINKS IM FORUM POSTEN"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="de.ebelmxi.schichtplan.app.MainActivity">

    <!-- As the main content view, the view below consumes the entire
         space available using match_parent in both dimensions. -->
    <FrameLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="25dp">

            <TextView
                android:layout_width="230dp"
                android:layout_height="wrap_content"
                android:text="@string/actDate"
                android:id="@+id/actDate"
                android:layout_gravity="center"
                android:gravity="center"
                android:textSize="24sp" />

            <ImageView
                android:layout_width="30dp"
                android:layout_height="40dp"
                android:id="@+id/btnBack"
                android:layout_gravity="left|center_vertical"
                android:src="@drawable/back"
                android:contentDescription="@null"
                android:layout_marginLeft="10dp" />

            <ImageView
                android:layout_width="30dp"
                android:layout_height="40dp"
                android:id="@+id/btnForward"
                android:layout_gravity="right|center_vertical"
                android:src="@drawable/forward"
                android:contentDescription="@null"
                android:layout_marginRight="10dp" />

        </FrameLayout>

        <TableLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:baselineAligned="false"
            android:layout_gravity="bottom|center_horizontal">

            <TableRow
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:background="#CCCCCC"
                android:layout_gravity="center_horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/shortMonday"
                    android:id="@+id/shortMonday"
                    android:layout_column="0"
                    android:textSize="24sp"
                    android:textStyle="bold"
                    android:gravity="center" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/shortTuesday"
                    android:id="@+id/shortTuesday"
                    android:layout_column="1"
                    android:textSize="24sp"
                    android:textStyle="bold"
                    android:gravity="center" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/shortWednesday"
                    android:id="@+id/shortWednesday"
                    android:textSize="24sp"
                    android:textStyle="bold"
                    android:layout_column="2"
                    android:gravity="center" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/shortThursday"
                    android:id="@+id/shortThursday"
                    android:layout_column="4"
                    android:textSize="24sp"
                    android:textStyle="bold"
                    android:gravity="center" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/shortFriday"
                    android:id="@+id/shortFriday"
                    android:layout_column="5"
                    android:textSize="24sp"
                    android:textStyle="bold"
                    android:gravity="center" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/shortSaturday"
                    android:id="@+id/shortSaturday"
                    android:layout_column="6"
                    android:textSize="24sp"
                    android:textStyle="bold"
                    android:gravity="center" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/shortSunday"
                    android:id="@+id/shortSunday"
                    android:layout_column="7"
                    android:textSize="24sp"
                    android:textStyle="bold"
                    android:gravity="center" />

            </TableRow>

            <TableRow
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_gravity="center_horizontal">


                <FrameLayout
                    android:layout_width="50dp"
                    android:layout_height="80dp"
                    android:layout_column="0"
                    android:layout_marginTop="1dp"
                    android:layout_marginLeft="1dp"
                    android:background="#EEEEEE">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="28"
                        android:id="@+id/date00"
                        android:layout_gravity="center_horizontal|bottom"
                        android:layout_marginBottom="3dp"
                        android:textColor="#999999" />

                    <FrameLayout
                        android:layout_width="fill_parent"
                        android:layout_height="25dp"
                        android:layout_gravity="center_horizontal|top"
                        android:background="@string/colorNacht">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/textShiftNacht"
                            android:id="@+id/shift00"
                            android:layout_gravity="center_horizontal|bottom"
                            android:layout_marginBottom="3dp"
                            android:textColor="@string/colorTextShiftNacht" />
                    </FrameLayout>
                </FrameLayout>
            </TableRow>
        </TableLayout>
    </FrameLayout>

    <!-- android:layout_gravity="start" tells DrawerLayout to treat
         this as a sliding drawer on the left side for left-to-right
         languages and on the right side for right-to-left languages.
         If you're not building against API 17 or higher, use
         android:layout_gravity="left" instead. -->
    <!-- The drawer is given a fixed width in dp and extends the full height of
         the container. -->
    <fragment android:id="@+id/navigation_drawer"
        android:layout_width="@dimen/navigation_drawer_width"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:name="de.ebelmxi.schichtplan.app.NavigationDrawerFragment"
        tools:layout="@layout/fragment_navigation_drawer" />

</android.support.v4.widget.DrawerLayout>

— geändert am 17.05.2014, 14:57:03

Antworten
  • Forum-Beiträge: 7

17.05.2014, 19:04:14 via Website

Ich habe jetzt mein Layout umgeschrieben!
Es hatt aber nichts genutzt! Bitte um Hilfe.

Der Logcat zeigt jetzt Garnichts mehr an das ist doof!

Mein aktueller XML aufbau:

(DrawerLayout)
      (FrameLayout)
            (TextView)
            (ImageView)
            (ImageView)
      (TableLayout)
            (TableRow)
                  (TextView)
                  (TextView)
            (TableRow)
                  (TableLayout)
                        (TableRow)
                              (TextView)
                        (TableRow)
                              (TextView)

— geändert am 17.05.2014, 19:10:22

Antworten
  • Forum-Beiträge: 7

18.05.2014, 00:23:36 via Website

Danke für deine Antwort!

Aber ich will ja mit android:background="#000000" keine Hintergrundgrafik sondern eine Farbe angeben, bei den beiden Images hab ich das mit android:src="@drawable/<Dateiname>" gemacht ist das falsch?

Antworten
  • Forum-Beiträge: 7

18.05.2014, 20:02:58 via App

Das heißt ich kann meine Hintergrund-Farbe nicht über einen string abspeichern?

Antworten

Empfohlene Artikel