今日学习总结
学习时间2h
package com.app.chapter04;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
public class LoginInputActivity extends AppCompatActivity
// implements View.OnClickListener
{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
// setContentView(R.layout.activity_login_input);
// findViewById(R.id.btn_jump_success).setOnClickListener(this);
//
// }
//
// @Override
// public void onClick(View v) {
// //创建一个意图对象,准备跳转到指定的活动界面
// Intent intent =new Intent(this,LoginSuccessActivity.class);
// //栈中存在待跳转的活动实例时,则重新创建该活动的实例,并清除原实例上方的所有实例
// intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK );
// startActivity(intent);
}
}
package com.app.chapter04;
import android.os.Bundle;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
public class LoginSuccessActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_login_success);
}
}
<?xml version="1.0" encoding="utf-8"?>标签:core,layout,androidx,6.15,import,android,view From: https://www.cnblogs.com/tianpeisen/p/18250948
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/becautiful01">
<Button
android:id="@+id/btn_jump_first"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="跳到一个页面"/>
</androidx.cons