- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的问题是我有一项 Activity Transport
。在那里,我有一个按钮 Auto
。当我点击 Auto
时,应该会打开 activity_auto
。但是 activity_transport
重新打开。我不知道我做错了什么?!有人可以帮帮我吗?
Activity _运输
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;
}
}
}
传输类的 XML 文件
<?xml version="1.0" encoding="utf-8"?>
<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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:orientation="horizontal"
android:layout_weight="0.3" >
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:orientation="horizontal">
<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" />
<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" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:orientation="horizontal"
android:layout_weight="1" >
<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"/>
<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" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dip"
android:orientation="horizontal"
android:layout_weight="0.3" >
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom">
<View
android:layout_width="match_parent"
android:layout_height="4dp"
android:layout_gravity="top"
android:background="@drawable/shadow" />
<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" />
</FrameLayout>
</LinearLayout>
错误详情:
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
Activity 自动类
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);
}
}
最佳答案
没有错误,你默认告诉你的 BottomNavigatonView
选择第三个菜单意味着执行这个案例
else if(item.getItemId()==R.id.menu_transport){
startActivity(new Intent(activity_auto.this, activity_transport.class));
}
这将打开您的 activity_transport.class
Activity 非常简单
删除这一行 bottomNavigationView.setSelectedItemId(R.id.menu_transport);
关于java - Android Studio - 单击按钮后当前 Activity 重新打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44832335/
我对 Android 很陌生,如果问题重复,请避免并发送链接。有三个 Activity A、B 和 C。 Activity A 获取一个用户名,我想在 Activity C 中显示该用户名,但我想先运
我正在尝试制作记事本应用程序,因此每次打开新笔记时,布局都会相同。另外, Activity 的数量(新注释)不应定义得尽可能多 最佳答案 如果 Activity 始终相同,您可能应该创建一个适配器,允
我有 3 个 Activity 。 主窗口 5 个按钮 在按钮的主窗口中按下此窗口打开(将其称为父窗口) 在父窗口按钮上按下此窗口打开调用它作为结束子窗口。 现在从子窗口我从父窗口获取值如下:
我遇到了一个 Activity backstack 问题。假设我的后台有 5 个 Activity :比如 Activity A、 Activity B、 Activity C、 Activity D
我正在寻找必须具有以下附加特征的 JMS 提供程序: 采用多代理,所有代理都必须处于事件状态(无单点故障) 仅在两台机器上进行扩展就足以满足我们的需求 能够保证订购(如果 1 个生产者 + 1 个消费
假设,我有一个由 TabHost 组成的选项卡 Activity 。 TabHost 包含 2 个选项卡,每两个选项卡都有一个 Activity 组。每个 Activity 组包含一项 Activit
我正在开发一个应用程序,我需要根据某些操作导航到特定 Activity 。这是一张图片 我的第一个 Activity 是 ReadingActivity。基于某些操作,用户将被带到 NewProjec
我创建了一个与服务器异步通信的应用程序。当应用程序发出服务器请求时,将创建一个带有“正在加载”通知的新对话框( Activity )。主要 Activity 实现了处理服务器响应的方法,我想在主要 A
我想在我的所有应用程序 Activity 中显示相同的选项菜单。我创建了一个实现菜单的通用 Activity ,并且我所有的进一步 Activity 都扩展了它。 问题:当我需要扩展其他特定 Acti
我有四个 Activity ,即 java 文件 - Activity1.java、activity2.java、activity3.java、activity4.java 和 xml 文件 - Ac
我有两个 Activity 。我想将数据从第二个 Activity 发送到上一个 Activity 。第一个 Activity 有自定义 ListView 和 bean 类。当我点击第二个 Activ
根 Activity 是堆栈中当前的第一个 Activity 还是 list 中指定为启动 Activity 的 Activity ? 支持应用程序 P 在启动时启动 Activity A。然后 A
你好 我想知道您在绘制 Activity 图选择“Activity ”时考虑了哪些关键点? 您如何从要建模的问题中选择 Activity ? 谢谢 最佳答案 Activity 图用于对正在开发的系统和
如何从主 Activity 启动 Activity 并在子 Activity 返回主 Activity 中退出操作后返回主 Activity ? 我已将子 Activity 作为启动器 Intent
我的工作流程如下: 登录 Activity -> ActivityB -> ActivityC -> ActivityD 我想将数据从LoginActivity传递到ActivityD,但不直接传递到
我之前曾尝试获得此问题的答案,但找不到可以解决我的问题的答案。我正在制作保存圆盘高尔夫球分数的应用程序。我的 MainActivity 有 4 个按钮。新比赛、恢复比赛、类(class)和球员。 At
我有一个 tts 非 UI 类和 Activity 类。现在在 Activity 类中,我有一个按钮,用户可以从中选择男声或女声,具体取决于我想要将字符串传递给 tts 类的选择,然后一次tts 类根
问题有点复杂,首先, Activity A 和 Activity B 的 list 中都有 android:noHistory = true 。我有一个自定义 serialized 类,假设 MyCl
在我的应用程序中,我有两个 Activity (AuthenticationActivity 和 MainActivity),每个 Activity 都有一个导航图和大量 fragment 。我创建了
这个问题在这里已经有了答案: 关闭 11 年前。 Possible Duplicate: How can i use compose email activity in tabView? 我想在选项
我是一名优秀的程序员,十分优秀!