title: Android Studio - After clicking button current activity reopens
body: <p>My problem is that I have one activity <code>Transport</code>. There, I have a button <code>Auto</code>. When I click on <code>Auto</code> the <code>activity_auto</code> should be opened. But instead the <code>activity_transport</code> reopens.
  I don't know what I'm doing wrong?!
  Can someone please help me?</p>
  
  <p>activity_Transport</p>
  
  <pre><code>package com.group6.travlhoe;
  
  import android.content.Intent;
  import android.os.Bundle;
  import android.support.v7.app.AppCompatActivity;
  import android.view.View;
  import android.widget.Button;
  
  /**
   * Created by STzavelas on 29.06.17.
   */
  
  public class activity_transport extends AppCompatActivity implements View.OnClickListener{
  
      Button btnAuto;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_transport);
  
          btnAuto = (Button) findViewById(R.id.Auto);
          btnAuto.setOnClickListener(this);
      }
  
      @Override
      public void onClick(View view) {
          switch (view.getId())
          {
              case R.id.Auto:
                  Intent i = new Intent(activity_transport.this, activity_auto.class);
                  startActivity(i);
                  break;
          }
  
      }
  }
  </code></pre>
  
  <p>The XML-File of Transport-Class</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:design="http://schemas.android.com/apk/res-auto"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:padding="10dp"
      android:background="@drawable/hintergrund"&gt;
  
      &lt;LinearLayout
  
          android:layout_width="match_parent"
          android:layout_height="0dip"
          android:orientation="horizontal"
          android:layout_weight="0.3" &gt;
  
      &lt;/LinearLayout&gt;
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="0dip"
          android:layout_weight="1"
          android:orientation="horizontal"&gt;
  
          &lt;Button
              android:id="@+id/Auto"
              android:layout_width="0dip"
              android:layout_height="match_parent"
              android:layout_weight="1"
              android:alpha="0.75"
              android:background="@mipmap/buttom_col"
              android:text="Auto"
              android:textStyle="bold" /&gt;
  
          &lt;Button
              android:id="@+id/Flugzeug"
              android:alpha="0.9"
              android:layout_width="0dip"
              android:layout_height="match_parent"
              android:layout_weight="1"
              android:background="@mipmap/buttom_col"
              android:text="Flugzeug"
              android:textStyle="bold" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="0dip"
          android:orientation="horizontal"
          android:layout_weight="1" &gt;
  
          &lt;Button
              android:id="@+id/Taxi"
              android:alpha="0.9"
              android:layout_width="0dip"
              android:layout_height="match_parent"
              android:layout_weight="1"
              android:background="@mipmap/buttom_col"
              android:text="Taxi"
              android:textStyle="bold"/&gt;
  
          &lt;Button
              android:id="@+id/Bahn"
              android:alpha="0.75"
              android:text="Bahn"
              android:textStyle="bold"
              android:layout_width="0dip"
              android:layout_height="match_parent"
              android:layout_weight="1"
              android:background="@mipmap/buttom_col" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
  
          android:layout_width="match_parent"
          android:layout_height="0dip"
          android:orientation="horizontal"
          android:layout_weight="0.3" &gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;FrameLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_gravity="bottom"&gt;
  
          &lt;View
              android:layout_width="match_parent"
              android:layout_height="4dp"
              android:layout_gravity="top"
              android:background="@drawable/shadow" /&gt;
  
  
          &lt;android.support.design.widget.BottomNavigationView
              android:id="@+id/bottomNavigationView"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              app:itemBackground="@color/colorWhite"
              design:menu="@menu/navigation" /&gt;
  
      &lt;/FrameLayout&gt;
  
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Error Details:</p>
  
  <pre><code>06-29 20:32:33.820 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:34:51.703 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:35:48.666 1515-1583/? E/HalDeviceManager: getAllChipInfo: called but mWifi is null!?
  06-29 20:35:48.666 1515-1583/? E/HalDeviceManager: getSupportedIfaceTypesInternal: no chip info found
  06-29 20:35:48.667 1515-1532/? E/BluetoothAdapter: Bluetooth binder is null
  06-29 20:35:48.667 1515-1532/? E/BatteryStatsService: no controller energy info supplied
  06-29 20:35:48.672 1515-1532/? E/KernelCpuSpeedReader: Failed to read cpu-freq: /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state (No such file or directory)
  06-29 20:35:48.672 1515-1532/? E/KernelUidCpuTimeReader: Failed to read uid_cputime: /proc/uid_cputime/show_uid_stat (No such file or directory)
  06-29 20:35:48.672 1515-1532/? E/KernelUidCpuFreqTimeReader: Failed to read /proc/uid_time_in_state: java.io.FileNotFoundException: /proc/uid_time_in_state (No such file or directory)
  06-29 20:35:48.676 1515-1532/? E/BatteryStatsService: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
  06-29 20:36:00.006 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:36:43.785 1515-1536/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 60)
  06-29 20:36:43.801 1515-2337/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 56)
  06-29 20:36:43.825 1515-1572/? E/InputDispatcher: channel 'fb02237 com.group6.travlhoe/com.group6.travlhoe.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:36:43.830 1515-1572/? E/InputDispatcher: channel '42e3da5 com.group6.travlhoe/com.group6.travlhoe.activity_auto (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:36:43.830 1515-1572/? E/InputDispatcher: channel '9caaf46 com.group6.travlhoe/com.group6.travlhoe.activity_transport (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:36:43.830 1515-1572/? E/InputDispatcher: channel '62733b com.group6.travlhoe/com.group6.travlhoe.activity_transport (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:36:43.831 1515-1572/? E/InputDispatcher: channel '8d0c4b8 com.group6.travlhoe/com.group6.travlhoe.activity_auto (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:36:43.831 1515-1572/? E/InputDispatcher: channel 'b93000 com.group6.travlhoe/com.group6.travlhoe.activity_auto (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:36:43.831 1515-1572/? E/InputDispatcher: channel 'e7536cd com.group6.travlhoe/com.group6.travlhoe.activity_transport (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:36:43.831 1515-1572/? E/InputDispatcher: channel 'f37b6cf com.group6.travlhoe/com.group6.travlhoe.activity_auto (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:36:43.831 1515-1572/? E/InputDispatcher: channel 'f4b06f5 com.group6.travlhoe/com.group6.travlhoe.activity_transport (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:36:43.831 1515-1572/? E/InputDispatcher: channel '7e757ea com.group6.travlhoe/com.group6.travlhoe.activity_auto (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:36:43.831 1515-1572/? E/InputDispatcher: channel '68a5e48 com.group6.travlhoe/com.group6.travlhoe.activity_transport (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:36:43.919 1515-1536/? E/ViewRootImpl[travlhoe]: Attempting to destroy the window while drawing!
                                                             window=android.view.ViewRootImpl@5f4980, title=Splash Screen com.group6.travlhoe
  06-29 20:36:44.063 1349-1365/? E/IPCThreadState: binder thread pool (4 threads) starved for 103 ms
  06-29 20:36:44.336 2261-4816/? E/ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
  06-29 20:36:44.690 2145-4527/? E/ctxmgr: [ProducerStatusImpl]updateStateForNewContextData: inactive, contextName=7
  06-29 20:36:44.944 2124-2124/? E/adbd: failed to connect to socket 'localabstract:com.group6.travlhoe': Connection refused
  06-29 20:36:47.320 1515-1603/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
  06-29 20:36:49.436 2261-4816/? E/ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
  06-29 20:36:54.783 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:36:55.181 1415-1571/? E/installd: Failed to delete /data/app/vmdl771514638.tmp: No such file or directory
  06-29 20:36:55.493 2145-4822/? E/NetworkScheduler.SR: Invalid parameter app
  06-29 20:36:55.493 2145-4822/? E/NetworkScheduler.SR: Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
  06-29 20:36:55.729 2261-4770/? E/ContentStoreEUAS: Failed to commit the deferred actions
  06-29 20:36:56.104 2602-2602/? E/Finsky: [2] com.google.android.finsky.wear.bl.a(3): onConnectionFailed: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
  06-29 20:36:56.125 2145-4822/? E/NetworkScheduler.SR: Invalid parameter app
  06-29 20:36:56.125 2145-4822/? E/NetworkScheduler.SR: Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
  06-29 20:36:57.030 1349-1365/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
  06-29 20:36:59.530 1515-1603/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
  06-29 20:37:00.003 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:37:00.016 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:37:02.152 4897-4897/com.group6.travlhoe E/Transport: android.support.v7.widget.AppCompatButton{a2ac0e1 VFED..C.. ...P.... 0,0-514,533 #7f0d0091 app:id/Auto}
  06-29 20:37:03.973 4897-4897/com.group6.travlhoe E/Transport: android.support.v7.widget.AppCompatButton{6c39ce6 VFED..C.. ...P.... 0,0-514,533 #7f0d0091 app:id/Auto}
  06-29 20:37:04.801 1515-1603/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
  06-29 20:37:12.622 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:37:15.050 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:37:15.062 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:37:15.493 4897-4897/com.group6.travlhoe E/Transport: android.support.v7.widget.AppCompatButton{48ba4a VFED..C.. ...P.... 0,0-514,533 #7f0d0091 app:id/Auto}
  06-29 20:37:17.766 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:37:18.997 1515-1603/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
  06-29 20:37:25.215 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:37:27.493 2145-2509/? E/UidImportanceUtils: exception when invoking removeOnUidImportanceListener
                                                       java.lang.reflect.InvocationTargetException
                                                           at java.lang.reflect.Method.invoke(Native Method)
                                                           at alvy.a(:com.google.android.gms:1123)
                                                           at akva.a(:com.google.android.gms:44820)
                                                           at lsx.a(:com.google.android.gms:246)
                                                           at akuy.run(:com.google.android.gms:2812)
                                                           at android.os.Handler.handleCallback(Handler.java:769)
                                                           at android.os.Handler.dispatchMessage(Handler.java:98)
                                                           at alxb.dispatchMessage(:com.google.android.gms:3028)
                                                           at android.os.Looper.loop(Looper.java:164)
                                                           at android.os.HandlerThread.run(HandlerThread.java:65)
                                                        Caused by: java.lang.IllegalArgumentException: Listener not registered: alvz@dee348d
                                                           at android.app.ActivityManager.removeOnUidImportanceListener(ActivityManager.java:3628)
                                                           at java.lang.reflect.Method.invoke(Native Method) 
                                                           at alvy.a(:com.google.android.gms:1123) 
                                                           at akva.a(:com.google.android.gms:44820) 
                                                           at lsx.a(:com.google.android.gms:246) 
                                                           at akuy.run(:com.google.android.gms:2812) 
                                                           at android.os.Handler.handleCallback(Handler.java:769) 
                                                           at android.os.Handler.dispatchMessage(Handler.java:98) 
                                                           at alxb.dispatchMessage(:com.google.android.gms:3028) 
                                                           at android.os.Looper.loop(Looper.java:164) 
                                                           at android.os.HandlerThread.run(HandlerThread.java:65) 
  06-29 20:37:27.799 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:37:27.810 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:37:32.499 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:37:44.009 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:37:44.026 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:38:00.002 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:38:33.601 1515-1536/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 60)
  06-29 20:38:33.611 1515-1525/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 56)
  06-29 20:38:33.641 1515-1572/? E/InputDispatcher: channel 'da3c079 com.group6.travlhoe/com.group6.travlhoe.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:38:33.642 1515-1572/? E/InputDispatcher: channel 'b0c44cd com.group6.travlhoe/com.group6.travlhoe.activity_auto (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:38:33.642 1515-1572/? E/InputDispatcher: channel '6dda3ce com.group6.travlhoe/com.group6.travlhoe.activity_transport (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:38:33.642 1515-1572/? E/InputDispatcher: channel 'edd48a3 com.group6.travlhoe/com.group6.travlhoe.activity_transport (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:38:33.642 1515-1572/? E/InputDispatcher: channel '5d39600 com.group6.travlhoe/com.group6.travlhoe.activity_auto (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:38:33.642 1515-1572/? E/InputDispatcher: channel '94554f5 com.group6.travlhoe/com.group6.travlhoe.activity_transport (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:38:33.642 1515-1572/? E/InputDispatcher: channel 'f821460 com.group6.travlhoe/com.group6.travlhoe.activity_auto (server)' ~ Channel is unrecoverably broken and will be disposed!
  06-29 20:38:33.749 1515-1536/? E/ViewRootImpl[travlhoe]: Attempting to destroy the window while drawing!
                                                             window=android.view.ViewRootImpl@f58dbf0, title=Splash Screen com.group6.travlhoe
  06-29 20:38:34.065 2261-4771/? E/ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
  06-29 20:38:34.367 2145-4526/? E/ctxmgr: [ProducerStatusImpl]updateStateForNewContextData: inactive, contextName=7
  06-29 20:38:37.124 1515-1603/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
  06-29 20:38:39.160 2261-4771/? E/ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
  06-29 20:38:43.839 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:38:43.944 1415-1434/? E/installd: Failed to delete /data/app/vmdl623981594.tmp: No such file or directory
  06-29 20:38:44.118 2145-4822/? E/NetworkScheduler.SR: Invalid parameter app
  06-29 20:38:44.118 2145-4822/? E/NetworkScheduler.SR: Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
  06-29 20:38:44.311 2261-4771/? E/ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
  06-29 20:38:44.577 6329-6336/? E/zygote: Failed sending reply to debugger: Broken pipe
  06-29 20:38:44.607 2261-6344/? E/ContentStoreEUAS: Failed to commit the deferred actions
  06-29 20:38:44.695 1610-1631/? E/ResourcesManager: failed to add asset path /data/app/com.group6.travlhoe-Y2EMoG6jUjwUupyHVUqE9Q==/base.apk
  06-29 20:38:44.696 1610-1631/? E/ResourcesManager: failed to add asset path /data/app/com.group6.travlhoe-Y2EMoG6jUjwUupyHVUqE9Q==/base.apk
  06-29 20:38:44.701 1610-1631/? E/ResourcesManager: failed to add asset path /data/app/com.group6.travlhoe-Y2EMoG6jUjwUupyHVUqE9Q==/base.apk
  06-29 20:38:44.702 1610-1631/? E/ResourcesManager: failed to add asset path /data/app/com.group6.travlhoe-Y2EMoG6jUjwUupyHVUqE9Q==/base.apk
  06-29 20:38:44.708 1610-1631/? E/ResourcesManager: failed to add asset path /data/app/com.group6.travlhoe-Y2EMoG6jUjwUupyHVUqE9Q==/base.apk
  06-29 20:38:44.778 2602-2602/? E/Finsky: [2] com.google.android.finsky.wear.bl.a(3): onConnectionFailed: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
  06-29 20:38:44.832 2145-4527/? E/NetworkScheduler.SR: Invalid parameter app
  06-29 20:38:44.832 2145-4527/? E/NetworkScheduler.SR: Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
  06-29 20:38:45.812 1349-2308/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
  06-29 20:38:48.281 1515-1603/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
  06-29 20:38:52.567 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:38:52.581 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:38:52.591 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:38:55.691 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:38:57.432 6329-6329/com.group6.travlhoe E/Transport: android.widget.Button{5d35365 VFED..C.. ...P.... 0,0-514,589 #7f0d0091 app:id/Auto}
  06-29 20:38:59.184 1515-1603/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
  06-29 20:38:59.485 6329-6329/com.group6.travlhoe E/Transport: android.widget.Button{fd4cc2f VFED..C.. ...P.... 0,0-514,589 #7f0d0091 app:id/Auto}
  06-29 20:39:02.987 1515-1603/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
  06-29 20:39:14.017 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:39:14.029 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:39:14.665 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:39:16.298 2145-2509/? E/UidImportanceUtils: exception when invoking removeOnUidImportanceListener
                                                       java.lang.reflect.InvocationTargetException
                                                           at java.lang.reflect.Method.invoke(Native Method)
                                                           at alvy.a(:com.google.android.gms:1123)
                                                           at akva.a(:com.google.android.gms:44820)
                                                           at lsx.a(:com.google.android.gms:246)
                                                           at akuy.run(:com.google.android.gms:2812)
                                                           at android.os.Handler.handleCallback(Handler.java:769)
                                                           at android.os.Handler.dispatchMessage(Handler.java:98)
                                                           at alxb.dispatchMessage(:com.google.android.gms:3028)
                                                           at android.os.Looper.loop(Looper.java:164)
                                                           at android.os.HandlerThread.run(HandlerThread.java:65)
                                                        Caused by: java.lang.IllegalArgumentException: Listener not registered: alvz@dee348d
                                                           at android.app.ActivityManager.removeOnUidImportanceListener(ActivityManager.java:3628)
                                                           at java.lang.reflect.Method.invoke(Native Method) 
                                                           at alvy.a(:com.google.android.gms:1123) 
                                                           at akva.a(:com.google.android.gms:44820) 
                                                           at lsx.a(:com.google.android.gms:246) 
                                                           at akuy.run(:com.google.android.gms:2812) 
                                                           at android.os.Handler.handleCallback(Handler.java:769) 
                                                           at android.os.Handler.dispatchMessage(Handler.java:98) 
                                                           at alxb.dispatchMessage(:com.google.android.gms:3028) 
                                                           at android.os.Looper.loop(Looper.java:164) 
                                                           at android.os.HandlerThread.run(HandlerThread.java:65) 
  06-29 20:39:21.305 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:39:21.321 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:39:26.207 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:40:00.003 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:40:00.029 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:41:00.002 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:41:42.245 6329-6329/com.group6.travlhoe E/Transport: android.widget.Button{9046266 VFED..C.. ...P.... 0,0-514,589 #7f0d0091 app:id/Auto}
  06-29 20:41:45.746 1515-1603/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
  06-29 20:41:49.101 6329-6329/com.group6.travlhoe E/Transport: android.widget.Button{a1aa735 VFED..C.. ...P.... 0,0-514,589 #7f0d0091 app:id/Auto}
  06-29 20:41:52.605 1515-1603/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
  06-29 20:43:00.006 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:43:00.046 1347-1347/? E/lowmemorykiller: Error writing /proc/2458/oom_score_adj; errno=22
  06-29 20:43:00.051 1515-1762/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 76)
  06-29 20:43:00.057 1515-1762/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 304)
  06-29 20:43:00.068 1515-1762/? E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 76)
  06-29 20:45:00.006 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:45:12.598 6329-6329/com.group6.travlhoe E/Transport: android.widget.Button{7790b6d VFED..C.. ...P.... 0,0-514,589 #7f0d0091 app:id/Auto}
  06-29 20:45:16.101 1515-1603/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
  06-29 20:45:23.979 6329-6329/com.group6.travlhoe E/Transport: android.widget.Button{8d30e07 VFED..C.. ...P.... 0,0-514,589 #7f0d0091 app:id/Auto}
  06-29 20:45:27.485 1515-1603/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
  06-29 20:47:00.009 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:48:00.007 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:49:00.008 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:51:00.010 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:52:00.003 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:52:15.067 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:52:15.078 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:53:00.006 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:53:00.021 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:54:00.002 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:54:00.028 1515-1528/? E/memtrack: Couldn't load memtrack module
  06-29 20:54:00.040 1515-1528/? E/memtrack: Couldn't load memtrack module
  </code></pre>
  
  <p>Activity Auto.class</p>
  
  <pre><code>package com.group6.travlhoe;
  
  import android.content.Intent;
  import android.graphics.Bitmap;
  import android.provider.MediaStore;
  import android.support.annotation.NonNull;
  import android.support.design.widget.BottomNavigationView;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.MenuItem;
  import android.view.View;
  import android.widget.Button;
  import android.widget.ImageButton;
  import android.widget.ImageView;
  
  public class activity_auto extends AppCompatActivity {
  
      ImageView imageView;
      private BottomNavigationView bottomNavigationView;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_auto);
  
          ImageButton btnCamera= (ImageButton)findViewById(R.id.btnCamera);
          imageView=(ImageView)findViewById(R.id.imageView);
  
          bottomNavigationView = (BottomNavigationView) findViewById(R.id.bottomNavigationView);
  
          bottomNavigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener(){
              @Override
              public boolean onNavigationItemSelected(@NonNull MenuItem item){
                  if (item.getItemId()==R.id.menu_start){
                      startActivity(new Intent(activity_auto.this, MainActivity.class));
                  } else if(item.getItemId()==R.id.menu_allgemein){
                      startActivity(new Intent(activity_auto.this, activity_allgemein.class));
                  } else if(item.getItemId()==R.id.menu_transport){
                      startActivity(new Intent(activity_auto.this, activity_transport.class));
                  } else if(item.getItemId()==R.id.menu_rechnung){
                      startActivity(new Intent(activity_auto.this, activity_rechnung.class));
                  } else if(item.getItemId()==R.id.menu_unterkunft){
                      startActivity(new Intent(activity_auto.this, activity_unterkunft.class));
                  }
                  return true;
              }
          });
  
          bottomNavigationView.setSelectedItemId(R.id.menu_transport);
      }
  
      public void onButtonClicked(View v){
          if(v.getId()==R.id.btnCamera) {
              Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
              startActivityForResult(intent, 0);
          }
          if(v.getId()==R.id.goToGPS) {
              Intent intent2 = new Intent(activity_auto.this, function_gps.class );
              startActivity(intent2);
          }
      }
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
  
          Bitmap bitmap = (Bitmap)data.getExtras().get("data");
  
          imageView.setImageBitmap(bitmap);
      }
  }
  </code></pre>