Java 在登录和注册屏幕上单击任何编辑文本时,设备将重新启动
每次我单击密码或电子邮件编辑文本键入内容时,几秒钟后,我的手机就会重新启动 我尝试了以下方法:Java 在登录和注册屏幕上单击任何编辑文本时,设备将重新启动,java,android,Java,Android,每次我单击密码或电子邮件编辑文本键入内容时,几秒钟后,我的手机就会重新启动 我尝试了以下方法: public class LoginActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout
public class LoginActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
FirebaseAuth mAuth = FirebaseAuth.getInstance();
final EditText email = findViewById(R.id.username);
final EditText password = findViewById(R.id.password);
final Button login_btn = findViewById(R.id.login_btn);
final ProgressBar loading_bar = findViewById(R.id.progressBar);
final TextView signup = findViewById(R.id.textView4);
final TextView reset_password = findViewById(R.id.textView38);
loading_bar.setVisibility(View.GONE);
reset_password.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(LoginActivity.this, PasswordResetActivity.class));
}
});
login_btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
loading_bar.setVisibility(View.VISIBLE);
String email_input = email.getText().toString();
String password_input = password.getText().toString();
if (email_input.isEmpty() || password_input.isEmpty()){
Toast.makeText(LoginActivity.this, "Please fill all the values!", Toast.LENGTH_SHORT).show();
loading_bar.setVisibility(View.GONE);
}else{
mAuth.signInWithEmailAndPassword(email_input, password_input).addOnCompleteListener(new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull @NotNull Task<AuthResult> task) {
if (email_input.isEmpty() || password_input.isEmpty()){
Toast.makeText(LoginActivity.this, "Please fill all the values!", Toast.LENGTH_SHORT).show();
}else{
if (task.isSuccessful()){
// user has logged in successfully \\
finish();
startActivity(new Intent(LoginActivity.this,
HomeActivity.class));
}else{
// user is not logged in \\
loading_bar.setVisibility(View.GONE);
Toast.makeText(LoginActivity.this, "Wrong email or password.
Please check your information and try again", Toast.LENGTH_SHORT).show();
}
}
}
});
}
}
});
signup.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(LoginActivity.this, SignupActivity.class));
}
});
}
}
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".LoginActivity"
android:background="@drawable/background">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/textView38"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Reset your password"
android:clickable="true"
android:focusable="true"
android:textColor="@color/white"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/textView3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/login_btn" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="172dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="181dp"
android:layout_marginBottom="614dp"
android:text="@string/app_name"
android:textColor="@color/white"
android:textSize="40sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.19999999" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:layout_marginBottom="50dp"
android:gravity="center"
android:padding="10dp"
android:text="Sign in to your SM account to laugh as much as you want for free"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/username"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:layout_constraintVertical_bias="0.0" />
<EditText
android:id="@+id/username"
android:layout_width="266dp"
android:layout_height="41dp"
android:layout_marginTop="32dp"
android:background="@drawable/et_style"
android:elevation="15dp"
android:ems="10"
android:gravity="center"
android:hint="email address"
android:inputType="textPersonName"
android:textColor="@color/black"
android:textColorHint="@color/black"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<EditText
android:id="@+id/password"
android:layout_width="266dp"
android:layout_height="41dp"
android:layout_marginTop="20dp"
android:background="@drawable/et_style"
android:ems="10"
android:hint="password"
android:elevation="15dp"
android:textColor="@color/black"
android:textColorHint="@color/black"
android:gravity="center"
android:inputType="textPassword"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/username" />
<Button
android:id="@+id/login_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginBottom="50dp"
android:background="@drawable/default_btn_style"
android:elevation="15dp"
android:text="Sign in to SM account"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/textView3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/password" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="90dp"
android:text="new to social meme?"
android:textColor="@color/white"
android:textSize="17sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/login_btn" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="create an account"
android:textColor="@color/white"
android:textStyle="bold"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView3"
app:layout_constraintVertical_bias="0.0" />
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/centerDark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/loading_icon_style"
android:elevation="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.909" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
2021-03-04 21:15:31.328 12812-12812/com.george.socialmeme I/ViewRootImpl@f8a674d[LoginActivityT]:
ViewPostIme pointer 0
2021-03-04 21:15:31.424 12812-12812/com.george.socialmeme I/ViewRootImpl@f8a674d[LoginActivityT]:
ViewPostIme pointer 1
2021-03-04 21:15:31.455 12812-12812/com.george.socialmeme D/Toast: show: focusDisplayId = 0,
isFocusInDesktop = false mCustomDisplayId=-1
2021-03-04 21:15:31.465 12812-25564/com.george.socialmeme V/Toast: SHOW:
android.widget.Toast$TN@1a4c799
2021-03-04 21:15:31.468 12812-12812/com.george.socialmeme V/Toast: HANDLE SHOW:
android.widget.Toast$TN@1a4c799 mView=null mNextView=android.widget.LinearLayout{14fca5e V.E......
......I. 0,0-0,0}
2021-03-04 21:15:31.468 12812-12812/com.george.socialmeme V/Toast: HANDLE HIDE:
android.widget.Toast$TN@1a4c799 mView=null
2021-03-04 21:15:31.481 12812-12812/com.george.socialmeme I/ViewRootImpl@cf14455[Toast]: setView =
android.widget.LinearLayout@14fca5e TM=true MM=false
2021-03-04 21:15:31.481 12812-12812/com.george.socialmeme V/Toast: Text: Qlea in
android.widget.Toast$TN@1a4c799
2021-03-04 21:15:31.493 12812-12812/com.george.socialmeme I/ViewRootImpl@cf14455[Toast]: Relayout
returned: old=(0,79,1080,2274) new=(283,1990,797,2106) req=(514,116)0 dur=7 res=0x7 s={true
480379101184} ch=true
2021-03-04 21:15:31.495 12812-25565/com.george.socialmeme D/OpenGLRenderer: createReliableSurface :
0x6fd8bf6f40(0x6fd8d36000)
2021-03-04 21:15:31.495 12812-25565/com.george.socialmeme D/Surface:
Surface::connect(this=0x6fd8d36000,api=1)
2021-03-04 21:15:31.496 12812-25565/com.george.socialmeme D/mali_winsys: EGLint
new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **,
EGLBoolean) returns 0x3000
2021-03-04 21:15:31.496 12812-25565/com.george.socialmeme D/OpenGLRenderer: eglCreateWindowSurface :
0x6fd9c5e000
2021-03-04 21:15:31.496 12812-25565/com.george.socialmeme D/Surface:
Surface::setBufferCount(this=0x6fd8d36000,bufferCount=3)
2021-03-04 21:15:31.496 12812-25565/com.george.socialmeme D/Surface:
Surface::allocateBuffers(this=0x6fd8d36000)
2021-03-04 21:15:31.499 12812-25565/com.george.socialmeme D/OpenGLRenderer: makeCurrent EglSurface :
0x6fd9c5e700 -> 0x6fd9c5e000
2021-03-04 21:15:31.522 12812-25565/com.george.socialmeme D/OpenGLRenderer: makeCurrent EglSurface :
0x6fd9c5e000 -> 0x6fd9c5e700
2021-03-04 21:15:31.537 12812-12812/com.george.socialmeme I/ViewRootImpl@cf14455[Toast]: MSG_RESIZED:
frame=(283,1990,797,2106) ci=(0,0,0,0) vi=(0,0,514,116) or=1
2021-03-04 21:15:33.466 12812-25564/com.george.socialmeme V/Toast: HIDE:
android.widget.Toast$TN@1a4c799
2021-03-04 21:15:33.467 12812-12812/com.george.socialmeme V/Toast: HANDLE HIDE:
android.widget.Toast$TN@1a4c799 mView=android.widget.LinearLayout{14fca5e V.E...... ........ 0,0-
514,116}
2021-03-04 21:15:33.467 12812-12812/com.george.socialmeme V/Toast: REMOVE!
android.widget.LinearLayout{14fca5e V.E...... ........ 0,0-514,116} in
android.widget.Toast$TN@1a4c799
2021-03-04 21:15:33.472 12812-25565/com.george.socialmeme D/OpenGLRenderer: destroyEglSurface :
0x6fd9c5e000
2021-03-04 21:15:33.474 12812-25565/com.george.socialmeme D/Surface:
Surface::disconnect(this=0x6fd8d36000,api=1)
2021-03-04 21:15:33.476 12812-25565/com.george.socialmeme D/OpenGLRenderer: ~ReliableSurface :
0x6fd8bf6f40
2021-03-04 21:15:33.477 12812-12812/com.george.socialmeme I/ViewRootImpl@cf14455[Toast]:
dispatchDetachedFromWindow
2021-03-04 21:15:33.488 12812-12812/com.george.socialmeme D/InputTransport: Input channel destroyed:
'30571db', fd=99
2021-03-04 21:15:41.261 12812-12812/com.george.socialmeme I/ViewRootImpl@f8a674d[LoginActivityT]:
ViewPostIme pointer 0
2021-03-04 21:15:41.321 12812-12812/com.george.socialmeme I/ViewRootImpl@f8a674d[LoginActivityT]:
ViewPostIme pointer 1
2021-03-04 21:15:41.339 12812-12812/com.george.socialmeme D/InputMethodManager:
prepareNavigationBarInfo() DecorView@258009f[LoginActivityT]
2021-03-04 21:15:41.339 12812-12812/com.george.socialmeme D/InputMethodManager:
getNavigationBarColor() -855310
2021-03-04 21:15:41.339 12812-12812/com.george.socialmeme V/InputMethodManager: Starting input:
tba=com.george.socialmeme ic=com.android.internal.widget.EditableInputConnection@c90f52f
mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
2021-03-04 21:15:41.339 12812-12812/com.george.socialmeme D/InputMethodManager: startInputInner - Id
: 0
2021-03-04 21:15:41.349 12812-12812/com.george.socialmeme I/InputMethodManager: startInputInner -
mService.startInputOrWindowGainedFocus
2021-03-04 21:15:41.353 12812-12812/com.george.socialmeme D/InputTransport: Input channel destroyed:
'ClientS', fd=95
2021-03-04 21:15:41.353 12812-12812/com.george.socialmeme D/InputMethodManager: SSI - flag : 0 Pid :
12812 view : com.george.socialmeme
2021-03-04 21:15:41.353 12812-12812/com.george.socialmeme D/InputMethodManager:
prepareNavigationBarInfo() DecorView@258009f[LoginActivityT]
2021-03-04 21:15:41.353 12812-12812/com.george.socialmeme D/InputMethodManager:
getNavigationBarColor() -855310
2021-03-04 21:15:41.358 12812-12812/com.george.socialmeme D/Editor: waiting for the right moment
2021-03-04 21:15:41.368 12812-12812/com.george.socialmeme I/AssistStructure: Flattened final assist
data: 2276 bytes, containing 1 windows, 10 views
2021-03-04 21:15:41.432 12812-12812/com.george.socialmeme I/ViewRootImpl@f8a674d[LoginActivityT]:
MSG_RESIZED: frame=(0,0,1080,2400) ci=(0,79,0,867) vi=(0,79,0,867) or=1
2021-03-04 21:15:41.471 12812-12812/com.george.socialmeme I/ViewRootImpl@f8a674d[LoginActivityT]:
Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=16 res=0x1 s={true
480395943936} ch=false
2021-03-04 21:15:41.479 12812-12812/com.george.socialmeme D/ScrollView: onsize change changed
- 制作一个新的androidstudio项目并将代码放在那里,看看问题是否出在项目库上
- 我们正在做登录布局,但我还是有同样的问题
- 删除我的部分代码,如
方法等使用Email和Password登录
- 我在谷歌上搜索了一个与我类似的问题,但没有找到任何有用的东西
- 将版面名称从活动\u主更改为活动\u登录
- 删除
方法并在不使用该方法的情况下运行活动onCreate
public class LoginActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
FirebaseAuth mAuth = FirebaseAuth.getInstance();
final EditText email = findViewById(R.id.username);
final EditText password = findViewById(R.id.password);
final Button login_btn = findViewById(R.id.login_btn);
final ProgressBar loading_bar = findViewById(R.id.progressBar);
final TextView signup = findViewById(R.id.textView4);
final TextView reset_password = findViewById(R.id.textView38);
loading_bar.setVisibility(View.GONE);
reset_password.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(LoginActivity.this, PasswordResetActivity.class));
}
});
login_btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
loading_bar.setVisibility(View.VISIBLE);
String email_input = email.getText().toString();
String password_input = password.getText().toString();
if (email_input.isEmpty() || password_input.isEmpty()){
Toast.makeText(LoginActivity.this, "Please fill all the values!", Toast.LENGTH_SHORT).show();
loading_bar.setVisibility(View.GONE);
}else{
mAuth.signInWithEmailAndPassword(email_input, password_input).addOnCompleteListener(new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull @NotNull Task<AuthResult> task) {
if (email_input.isEmpty() || password_input.isEmpty()){
Toast.makeText(LoginActivity.this, "Please fill all the values!", Toast.LENGTH_SHORT).show();
}else{
if (task.isSuccessful()){
// user has logged in successfully \\
finish();
startActivity(new Intent(LoginActivity.this,
HomeActivity.class));
}else{
// user is not logged in \\
loading_bar.setVisibility(View.GONE);
Toast.makeText(LoginActivity.this, "Wrong email or password.
Please check your information and try again", Toast.LENGTH_SHORT).show();
}
}
}
});
}
}
});
signup.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(LoginActivity.this, SignupActivity.class));
}
});
}
}
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".LoginActivity"
android:background="@drawable/background">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/textView38"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Reset your password"
android:clickable="true"
android:focusable="true"
android:textColor="@color/white"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/textView3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/login_btn" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="172dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="181dp"
android:layout_marginBottom="614dp"
android:text="@string/app_name"
android:textColor="@color/white"
android:textSize="40sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.19999999" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:layout_marginBottom="50dp"
android:gravity="center"
android:padding="10dp"
android:text="Sign in to your SM account to laugh as much as you want for free"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/username"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView"
app:layout_constraintVertical_bias="0.0" />
<EditText
android:id="@+id/username"
android:layout_width="266dp"
android:layout_height="41dp"
android:layout_marginTop="32dp"
android:background="@drawable/et_style"
android:elevation="15dp"
android:ems="10"
android:gravity="center"
android:hint="email address"
android:inputType="textPersonName"
android:textColor="@color/black"
android:textColorHint="@color/black"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2" />
<EditText
android:id="@+id/password"
android:layout_width="266dp"
android:layout_height="41dp"
android:layout_marginTop="20dp"
android:background="@drawable/et_style"
android:ems="10"
android:hint="password"
android:elevation="15dp"
android:textColor="@color/black"
android:textColorHint="@color/black"
android:gravity="center"
android:inputType="textPassword"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/username" />
<Button
android:id="@+id/login_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginBottom="50dp"
android:background="@drawable/default_btn_style"
android:elevation="15dp"
android:text="Sign in to SM account"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/textView3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/password" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="90dp"
android:text="new to social meme?"
android:textColor="@color/white"
android:textSize="17sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/login_btn" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="create an account"
android:textColor="@color/white"
android:textStyle="bold"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView3"
app:layout_constraintVertical_bias="0.0" />
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/centerDark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/loading_icon_style"
android:elevation="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.909" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
2021-03-04 21:15:31.328 12812-12812/com.george.socialmeme I/ViewRootImpl@f8a674d[LoginActivityT]:
ViewPostIme pointer 0
2021-03-04 21:15:31.424 12812-12812/com.george.socialmeme I/ViewRootImpl@f8a674d[LoginActivityT]:
ViewPostIme pointer 1
2021-03-04 21:15:31.455 12812-12812/com.george.socialmeme D/Toast: show: focusDisplayId = 0,
isFocusInDesktop = false mCustomDisplayId=-1
2021-03-04 21:15:31.465 12812-25564/com.george.socialmeme V/Toast: SHOW:
android.widget.Toast$TN@1a4c799
2021-03-04 21:15:31.468 12812-12812/com.george.socialmeme V/Toast: HANDLE SHOW:
android.widget.Toast$TN@1a4c799 mView=null mNextView=android.widget.LinearLayout{14fca5e V.E......
......I. 0,0-0,0}
2021-03-04 21:15:31.468 12812-12812/com.george.socialmeme V/Toast: HANDLE HIDE:
android.widget.Toast$TN@1a4c799 mView=null
2021-03-04 21:15:31.481 12812-12812/com.george.socialmeme I/ViewRootImpl@cf14455[Toast]: setView =
android.widget.LinearLayout@14fca5e TM=true MM=false
2021-03-04 21:15:31.481 12812-12812/com.george.socialmeme V/Toast: Text: Qlea in
android.widget.Toast$TN@1a4c799
2021-03-04 21:15:31.493 12812-12812/com.george.socialmeme I/ViewRootImpl@cf14455[Toast]: Relayout
returned: old=(0,79,1080,2274) new=(283,1990,797,2106) req=(514,116)0 dur=7 res=0x7 s={true
480379101184} ch=true
2021-03-04 21:15:31.495 12812-25565/com.george.socialmeme D/OpenGLRenderer: createReliableSurface :
0x6fd8bf6f40(0x6fd8d36000)
2021-03-04 21:15:31.495 12812-25565/com.george.socialmeme D/Surface:
Surface::connect(this=0x6fd8d36000,api=1)
2021-03-04 21:15:31.496 12812-25565/com.george.socialmeme D/mali_winsys: EGLint
new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **,
EGLBoolean) returns 0x3000
2021-03-04 21:15:31.496 12812-25565/com.george.socialmeme D/OpenGLRenderer: eglCreateWindowSurface :
0x6fd9c5e000
2021-03-04 21:15:31.496 12812-25565/com.george.socialmeme D/Surface:
Surface::setBufferCount(this=0x6fd8d36000,bufferCount=3)
2021-03-04 21:15:31.496 12812-25565/com.george.socialmeme D/Surface:
Surface::allocateBuffers(this=0x6fd8d36000)
2021-03-04 21:15:31.499 12812-25565/com.george.socialmeme D/OpenGLRenderer: makeCurrent EglSurface :
0x6fd9c5e700 -> 0x6fd9c5e000
2021-03-04 21:15:31.522 12812-25565/com.george.socialmeme D/OpenGLRenderer: makeCurrent EglSurface :
0x6fd9c5e000 -> 0x6fd9c5e700
2021-03-04 21:15:31.537 12812-12812/com.george.socialmeme I/ViewRootImpl@cf14455[Toast]: MSG_RESIZED:
frame=(283,1990,797,2106) ci=(0,0,0,0) vi=(0,0,514,116) or=1
2021-03-04 21:15:33.466 12812-25564/com.george.socialmeme V/Toast: HIDE:
android.widget.Toast$TN@1a4c799
2021-03-04 21:15:33.467 12812-12812/com.george.socialmeme V/Toast: HANDLE HIDE:
android.widget.Toast$TN@1a4c799 mView=android.widget.LinearLayout{14fca5e V.E...... ........ 0,0-
514,116}
2021-03-04 21:15:33.467 12812-12812/com.george.socialmeme V/Toast: REMOVE!
android.widget.LinearLayout{14fca5e V.E...... ........ 0,0-514,116} in
android.widget.Toast$TN@1a4c799
2021-03-04 21:15:33.472 12812-25565/com.george.socialmeme D/OpenGLRenderer: destroyEglSurface :
0x6fd9c5e000
2021-03-04 21:15:33.474 12812-25565/com.george.socialmeme D/Surface:
Surface::disconnect(this=0x6fd8d36000,api=1)
2021-03-04 21:15:33.476 12812-25565/com.george.socialmeme D/OpenGLRenderer: ~ReliableSurface :
0x6fd8bf6f40
2021-03-04 21:15:33.477 12812-12812/com.george.socialmeme I/ViewRootImpl@cf14455[Toast]:
dispatchDetachedFromWindow
2021-03-04 21:15:33.488 12812-12812/com.george.socialmeme D/InputTransport: Input channel destroyed:
'30571db', fd=99
2021-03-04 21:15:41.261 12812-12812/com.george.socialmeme I/ViewRootImpl@f8a674d[LoginActivityT]:
ViewPostIme pointer 0
2021-03-04 21:15:41.321 12812-12812/com.george.socialmeme I/ViewRootImpl@f8a674d[LoginActivityT]:
ViewPostIme pointer 1
2021-03-04 21:15:41.339 12812-12812/com.george.socialmeme D/InputMethodManager:
prepareNavigationBarInfo() DecorView@258009f[LoginActivityT]
2021-03-04 21:15:41.339 12812-12812/com.george.socialmeme D/InputMethodManager:
getNavigationBarColor() -855310
2021-03-04 21:15:41.339 12812-12812/com.george.socialmeme V/InputMethodManager: Starting input:
tba=com.george.socialmeme ic=com.android.internal.widget.EditableInputConnection@c90f52f
mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
2021-03-04 21:15:41.339 12812-12812/com.george.socialmeme D/InputMethodManager: startInputInner - Id
: 0
2021-03-04 21:15:41.349 12812-12812/com.george.socialmeme I/InputMethodManager: startInputInner -
mService.startInputOrWindowGainedFocus
2021-03-04 21:15:41.353 12812-12812/com.george.socialmeme D/InputTransport: Input channel destroyed:
'ClientS', fd=95
2021-03-04 21:15:41.353 12812-12812/com.george.socialmeme D/InputMethodManager: SSI - flag : 0 Pid :
12812 view : com.george.socialmeme
2021-03-04 21:15:41.353 12812-12812/com.george.socialmeme D/InputMethodManager:
prepareNavigationBarInfo() DecorView@258009f[LoginActivityT]
2021-03-04 21:15:41.353 12812-12812/com.george.socialmeme D/InputMethodManager:
getNavigationBarColor() -855310
2021-03-04 21:15:41.358 12812-12812/com.george.socialmeme D/Editor: waiting for the right moment
2021-03-04 21:15:41.368 12812-12812/com.george.socialmeme I/AssistStructure: Flattened final assist
data: 2276 bytes, containing 1 windows, 10 views
2021-03-04 21:15:41.432 12812-12812/com.george.socialmeme I/ViewRootImpl@f8a674d[LoginActivityT]:
MSG_RESIZED: frame=(0,0,1080,2400) ci=(0,79,0,867) vi=(0,79,0,867) or=1
2021-03-04 21:15:41.471 12812-12812/com.george.socialmeme I/ViewRootImpl@f8a674d[LoginActivityT]:
Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=16 res=0x1 s={true
480395943936} ch=false
2021-03-04 21:15:41.479 12812-12812/com.george.socialmeme D/ScrollView: onsize change changed
我已经在不同的设备上测试了整个代码,无论是物理设备还是仿真设备,似乎都没有问题。这似乎是您的特定设备的问题,可能与您的代码无关。我已在不同的设备(物理设备和模拟设备)上测试了整个代码,似乎没有问题。这似乎是您的特定设备的问题,可能与您的代码无关。当您说重新启动时,您的意思是手机正在完全关闭?听起来很不寻常@HenryTwist Yes您是否尝试在不使用
onCreate
代码的情况下运行活动,然后逐行将其添加回?然后我们就可以诊断问题出在哪里。@HenryTwist我试过了,但我的手机又重新启动了,你能帮我吗?只是想澄清一下,你是从另一个活动开始的LoginActivity
,除了super
和setContentView
之外,onCreate
中没有代码。然后,在您触摸导致手机重新启动的EditText
之前,不会发生任何错误?当您说重新启动时,您的意思是手机正在完全关闭?听起来很不寻常@HenryTwist Yes您是否尝试在不使用onCreate
代码的情况下运行活动,然后逐行将其添加回?然后我们就可以诊断问题出在哪里。@HenryTwist我试过了,但我的手机又重新启动了,你能帮我吗?只是想澄清一下,你是从另一个活动开始的LoginActivity
,除了super
和setContentView
之外,onCreate
中没有代码。然后,在触摸导致手机重新启动的EditText
之前,不会发生任何错误?