我正在尝试注销我的项目。我希望每当我单击注销图像时,我都打算再次进入我的登录页面。对于登录,我使用的是 Firebase。但是我已经为意图编写了代码,并且每当我运行我的应用程序时它都会崩溃。不幸的是,动画(我的项目名称)已经停止。
import android.content.Intent;
import android.graphics.drawable.AnimationDrawable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import com.google.firebase.auth.FirebaseAuth;
public class dashboard extends AppCompatActivity {
RelativeLayout myLayout;
AnimationDrawable animationDrawable;
ImageView imgauto,imgbud,imglimit,imgug,imgsignout;
FirebaseAuth firebaseAuth;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dashboard);
timing(); ////////// animation
imgauto = findViewById(R.id.autoimg);
imgug = findViewById(R.id.ugimg);
imglimit =findViewById(R.id.limitimg);
imgsignout=findViewById(R.id.sign_out);
imgauto.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(dashboard.this,view_rooms.class));
}
});
imglimit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(dashboard.this,limit_rooms.class));
}
});
imgug.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(dashboard.this,guidance_new.class));
}
});
imgsignout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
firebaseAuth.signOut();
finish();
startActivity(new Intent(dashboard.this,MainActivity.class));
}
});
}
}
12345678_0001
Smart猫小萌
相关分类