技术标签: # Android练习 android
MainActivity.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Activity.MainActivity">
<Button
android:id="@+id/ys_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="309dp"
android:text="使用隐式Intent打开TargetActivity"
tools:layout_editor_absoluteX="140dp"
tools:layout_editor_absoluteY="293dp" />
</RelativeLayout>
TargetActivity.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Activity.TargetActivity">
<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="271dp"
android:layout_marginEnd="47dp"
android:text="恭喜您,成功使用隐式Intent打开了这个Activity!!"
android:textSize="14dp"
tools:layout_editor_absoluteX="142dp"
tools:layout_editor_absoluteY="190dp" />
</RelativeLayout>
AndroidManifest.xml
<activity android:name=".Activity.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Activity.TargetActivity" >
<intent-filter>
<action android:name="yinshiIntent"/>
<category android:name="my_intent"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
MainActivity.java
package com.example.learning.Activity;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.example.learning.R;
public class MainActivity extends AppCompatActivity {
// 声明组件
Button ys_btn;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main2);
// 获取组件
ys_btn = findViewById(R.id.ys_btn);
// 添加点击事件
ys_btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// 创建隐式启动
Intent intent = new Intent();
intent.setAction("yinshiIntent"); // 指定Action
intent.addCategory("my_intent"); // 指定Category
startActivity(intent);
}
});
}
}
文章浏览阅读1.1w次,点赞17次,收藏62次。Java中当控制台用户输入错误时怎么重新输入Java中当控制台用户输入的数据类型不是我们指定输入的数据类型时,我们往往需要用户重新输入。_java如果用户输入错误,可以重复输入直到输入正确,执行相应的操作后 退出循环
文章浏览阅读6.3k次。转载自:https://blog.csdn.net/weixin_45284684/article/details/106259347AltiumDesigner 中对已覆铜进行 - 开窗-处理PCB在铜箔之上会有一层绿油覆盖层(阻焊层),开窗即是去除该阻焊层,将铜箔裸露出来。开窗作用:开窗后在裸露铜箔(导线)上加锡(加厚了导线的厚度)从而增加电流导通能力;开窗后,铜箔(导线)裸露与空气直接接触,有助于散热。1 2走线开窗、不规则开窗(区域开窗)**走线开窗示意图不规则开窗_ad中画好的铜皮怎么开窗
文章浏览阅读2.4w次,点赞3次,收藏2次。vue后台水印实现Vue项目在页面添加水印功能创建watermark.js文件<template> <router-view v-waterMark="waterCode" ></router-view></template><script>import waterMark from 'common/utils/watermark';export default { directives: {_v-watermark
文章浏览阅读2.3k次,点赞3次,收藏6次。实现的关键是 CSS 的opacity和hover,本文也主要介绍遮罩层的实现父级元素 sub-module-type 要display: block;position: relative;子级元素 mask 遮罩层 position: absolute;opacity: 0;pointer-events:none;鼠标悬浮时 opacity: 1; <div class="sub-module"> <div class="sub-modul..._css 悬浮遮罩进行操作怎么操作
文章浏览阅读2.8k次。ora-64203:Destination buffer too small to hold CLOB data after character set conversion.拼接字符串时过长引起,报缓冲区太小错误SELECT WM_CONCAT(field_A|| field_b) FROM table_A WHERE fie..._destination buffer too small to hold clob data after character set conversio
文章浏览阅读3.5k次。查询方法条件查询方法where 方法可以使用 where 方法进行 AND 条件查询:Db::table('think_user') ->where('name','like','%thinkphp') ->where('status',1) ->find();多字段相同条件的 AND 查询可以简化为如下方式:Db::table('think_user') ->where('name&title','like','%_thinkphp db where
文章浏览阅读2.5k次。对Lite : NDK r14b,bazel 0.18, tensorflow 1.12以下是没问题的对mobile:NDK R16b, bazel 0.18 tensorflow 1.12是没有问题的。 bazel 编译appbazel build --cxxopt=--std=c++11 //tensorflow/contrib/lite/java/demo/app/src/m..._编译tflite jar包
文章浏览阅读1.9w次,点赞34次,收藏204次。不废话,从基础开始学VBA的类模块。主要分下面几个部分:1.什么是类2.为什么要学习类3.类的预备知识4.创建类属性5.创建类方法6.创建类事件7.一个完整的类实例8.未完的结尾什么是类在我们身边,相同或相似的物品无处不在,从生活用品,到工业产品,……通常它们都是由同一个可以称为“模具”的东西生产出来。理解类,一般要先从对..._vba class 属性
文章浏览阅读4.8k次,点赞2次,收藏6次。SQLNonTransientConnectionException_java.sql.sqlnontransientconnectionexception: data source rejected establishm
文章浏览阅读4.6k次。SpringBoot默认静态资源访问路径SpringBoot默认静态资源访问路径:1.2 IDEA中对应的路径将静态资源放在默认访问路劲下,可以直接访问。编写静态资源映射类Spring Boot自定义静态资源映射Spring Boot——静态资源_springboot配置静态资源访问路径
文章浏览阅读4.8k次。$dataStr = str_replace("\\/", "/", json_encode($data,JSON_UNESCAPED_UNICODE)) ;_php json_encode 双引号
文章浏览阅读719次。GhostNet介绍GhostNet是由华为诺亚方舟实验室研究出新的网络神经框架在2020年CVPR上发布文章,该模型和代码已在GitHub上开源。GhostNet论文:link.GitHub代码:linkGhost Module[Ghost Module]我们对Markdown编辑器进行了一些功能拓展与语法支持,除了标准的Markdown编辑器功能,我们增加了如下几点新功能,帮助你用它写博客:全新的界面设计 ,将会带来全新的写作体验;在创作中心设置你喜爱的代码高亮样式,Markdown _ghostnet squeezeexcite