首页 > 其他分享 >6.13

6.13

时间:2024-06-16 17:22:59浏览次数:9  
标签:6.13 void TAG Intent import android ActStartActivity

今日学习总结

学习时间1.5h代码如下

package com.app.chapter04;

import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
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 ActStartActivity extends AppCompatActivity implements View.OnClickListener {

private static final String TAG ="ning";


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.d(TAG,"ActStartActivity onCreate");
EdgeToEdge.enable(this);
setContentView(R.layout.activity_act_start);
findViewById(R.id.btn_act_next).setOnClickListener(this);
}

@Override
public void onClick(View v) {
// 1.在Intent的构造函数中指定
// Intent intent = new Intent(this,ActFinishActivity.class);
//
// 2.调用意图对象的setClass方法指定
// Intent intent =new Intent();
// intent.setClass(this,ActFinishActivity.class);
//
//3.调用意图对象的setComponent方法指定
Intent intent = new Intent();
ComponentName component =new ComponentName(this,ActFinishActivity.class);
intent.setComponent(component);
startActivity(intent);
}


@Override
protected void onStart() {
super.onStart();
Log.d(TAG,"ActStartActivity onStart");
}


@Override
protected void onResume() {
super.onResume();
Log.d(TAG,"ActStartActivity onResume");
}


@Override
protected void onPause() {
super.onPause();
Log.d(TAG,"ActStartActivity onPause");
}

@Override
protected void onStop() {
super.onStop();
Log.d(TAG,"ActStartActivity onStop");
}


@Override
protected void onDestroy() {
super.onDestroy();
Log.d(TAG,"ActStartActivity onDestroy");
}

}


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
tools:context=".ActStartActivity"
android:orientation="vertical"
android:background="@drawable/becautiful01"
android:gravity="center">

<Button
android:id="@+id/btn_act_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="跳转到下一个界面"/>




</LinearLayout>

标签:6.13,void,TAG,Intent,import,android,ActStartActivity
From: https://www.cnblogs.com/tianpeisen/p/18250940

相关文章

  • 6.13安卓开发日记57
    今天完成工程数学作业实验五实验五:MATLAB最优化工具箱的使用一、实验目的通过一个农业生产计划优化安排的实例求解,培养学生解决实际线性规划问题的初步能力;熟悉线性规划的建模过程;掌握Matlab优化工具箱中线性规划函数的调用。通过一个投资组合优化问题的实例求解,培养学生解决......
  • 6.13学习内容
    今天完成了计算机网络的实验三 综合性训练(搭建中小企业园区网)一、实验目的:1.通过对网络设备的连通和对拓扑的分析,加深对常见典型局域网拓扑的理解;2.通过路由建立起网络之间的连接,了解网络路由的设计与配置;3.进一步熟悉交换机、路由器的基本操作命令。二、实验设备:六个PC,两......
  • 6.13-栈与队列
    基础知识首先大家要知道栈和队列是STL(C++标准库)里面的两个数据结构。C++标准库是有多个版本的,要知道我们使用的STL是哪个版本,才能知道对应的栈和队列的实现原理。那么来介绍一下,三个最为普遍的STL版本:HPSTL其他版本的C++STL,一般是以HPSTL为蓝本实现出来的,HPSTL是C++S......
  • 6.13模拟赛题解
    前面是题解,后面是垃圾话。T1P1541[NOIP2010提高组]乌龟棋没脑子直接设\(f_{p,i,j,k,w}\),为走到\(p\),还剩\(1,2,3,4\)牌各\(i,j,k,w\)张,\(9\cdot10^8\),发现到一个点只要三种牌的数量确定,最后一种也确定了,所以直接设\(f_{p,i,j,k}\)表示三种牌的就行,大力DP即可。T......
  • 6.13API接口服务类漏洞探针
    ip地址解析:www.x.x.x.com,对应网站目录为d:/wwwroot/xiaodi/而127.x.x.x,对应网站目录为d:/wwwroot/,可能存在网站备份文件zip,所以ip网址端口都的扫描;协议端弱口令爆破:超级弱口令检查工具;端口服务安全问题(用于无思路时)思路:利用探针对端口探测后,对口令安全、Web漏洞、中间......
  • 2024.6.13
    2024.6.13【痛苦的,热烈的,误解的,无解的,快乐的,解脱的】Thursday五月初八<theme=oi-"gametheory">P4018Roy&October之取石子Roy&October之取石子题目背景Roy和October两人在玩一个取石子的游戏。题目描述游戏规则是这样的:共有\(n\)个石子,两人每次都只能取\(p^......
  • 文献精读_2024.06.13
    Universalandextensiblelanguage-visionmodelsfororgansegmentationandtumordetectionfromabdominalcomputedtomography来源:https://doi.org/10.1016/j.media.2024.103226GitHub仓库:https://github.com/ljwztc/CLIP-Driven-Universal-Model第一眼,仓库上面放......
  • 6.13 个人总结
    在这个学期的学习旅程中,我作为软件工程专业的学生,经历了从理论到实践的全方位锻炼,不仅在专业技能上取得了显著进步,也在团队协作、项目管理和自我认知方面获得了宝贵的经验。以下是对我本学期学习经历的全面总结,包括对上述问题的深入思考。 1.课程计划完成程度回顾我的第一周课......
  • 完美解码 最新版 2023.06.13
    因为完美解码官网的下载链接404了,所以给大家分享一下。完美解码是一款能实现各种流行视频、HDTV播放及编码的全能型影音解码包,自带MediaPlayerClassic、KMPlayer、PotPlayer三款流行播放器,支持简、英语言平台下安装,能播放AVI、VCD、DVD、MPG、MP4、RMVB、TS、TP、EVO、M2......
  • 2023.6.13 05.数据库索引操作
    05.数据库索引操作1.索引概述2.索引分类3.索引环境4.索引创建5.索引测试6.索引管理 1.索引概述索引就好⽐⼀本书的⽬录,它会让你更快的找到内容,显然⽬录(索引)并不是越多越好,假如这本书1000⻚,有500⻚也是⽬录,它当然效率低,⽬录是要占纸张的,⽽索引是要占磁盘空间的。 ......