android 自定义view画表格,Android自定义View实现课程表表格

自己闲下来时间写的一个课表控件,使用的自定义LinearLayout,里面View都是用代码实现的,最终效果如下图,写的可能有问题希望多多指点

059a3cc0d9dfa1e42706e0414893d74b.png

创建一个自定义LinearLayout 控件用来装载课程的信息和课程的周数,和节数大概的布局三这样的

050b7c0a81ebd892dd038f6c501bbccb.png

根据上面的看来觉得总体布局我分了两个 上面的星期是一个 下面的节数和格子是一个  总体使用Vertical  而单独内部者使用了Horizontal布局  中间使用了两种布局线条 是这样的

/**

* 横的分界线

*

* @return

*/

private View getWeekTransverseLine() {

TextView mWeekline = new TextView(getContext());

mWeekline.setBackgroundColor(getResources().getColor(R.color.view_line));

mWeekline.setHeight(TimeTableLineHeight);

mWeekline.setWidth(LayoutParams.FILL_PARENT);

return mWeekline;

}

/**

* 竖向分界线

*

* @return

*/

private View getWeekVerticalLine() {

TextView mWeekline = new TextView(getContext());

mWeekline.setBackgroundColor(getResources().getColor(R.color.view_line));

mWeekline.setHeight(dip2px(TimeTableWeekNameHeight));

mWeekline.setWidth((TimeTableLineHeight));

return mWeekline;

}

下面就看其它的View

那就从上到下开始先看星期的布局

private void initView() {

mHorizontalWeekLayout = new LinearLayout(getContext());

mHorizontalWeekLayout.setOrientation(HORIZONTAL);

mVerticalWeekLaout = new LinearLayout(getContext());

mVerticalWeekLaout.setOrientation(HORIZONTAL);

//表格

for (int i = 0; i <= WEEKNUM; i++) {

switch (i) {

case 0:

//课表出的0,0格子 空白的

TextView mTime = new TextView(getContext());

mTime.setHeight(dip2px(TimeTableWeekNameHeight));

mTime.setWidth((dip2px(TimeTableNumWidth)));

mHorizontalWeekLayout.addView(mTime);

//绘制1~MAXNUM

LinearLayout mMonday = new LinearLayout(getContext());

ViewGroup.LayoutParams mm = new ViewGroup.LayoutParams(dip2px(TimeTableNumWidth), dip2px(MAXNUM * TimeTableHeight) + MAXNUM * 2);

mMonday.setLayoutParams(mm);

mMonday.setOrientation(VERTICAL);

for (int j = 1; j <= MAXNUM; j++) {

TextView mNum = new TextView(getContext());

mNum.setGravity(Gravity.CENTER);

mNum.setTextColor(getResources().getColor(R.color.text_color));

mNum.setHeight(dip2px(TimeTableHeight));

mNum.setWidth(dip2px(TimeTableNumWidth));

mNum.setTextSize(14);

mNum.setText(j + "");

mMonday.addView(mNum);

mMonday.addView(getWeekTransverseLine());

}

mVerticalWeekLaout.addView(mMonday);

break;

case 1:

case 2:

case 3:

case 4:

case 5:

case 6:

case 7:

// 设置显示星期一 到星期天

LinearLayout mHoriView = new LinearLayout(getContext());

mHoriView.setOrientation(VERTICAL);

TextView mWeekName = new TextView(getContext());

mWeekName.setTextColor(getResources().getColor(R.color.text_color));

mWeekName.setWidth(((getViewWidth() - dip2px(TimeTableNumWidth))) / WEEKNUM);

mWeekName.setHeight(dip2px(TimeTableWeekNameHeight));

mWeekName.setGravity(Gravity.CENTER);

mWeekName.setTextSize(16);

mWeekName.setText(weekname[i - 1]);

mHoriView.addView(mWeekName);

mHorizontalWeekLayout.addView(mHoriView);

List mListMon = new ArrayList<>();

//遍历出星期1~7的课表

for (TimeTableModel timeTableModel : mListTimeTable) {

if (timeTableModel.getWeek() == i) {

mListMon.add(timeTableModel);

}

}

//添加

LinearLayout mLayout = getTimeTableView(mListMon, i);

mLayout.setOrientation(VERTICAL);

ViewGroup.LayoutParams linearParams = new ViewGroup.LayoutParams((getViewWidth() - dip2px(20)) / WEEKNUM, LayoutParams.FILL_PARENT);

mLayout.setLayoutParams(linearParams);

mLayout.setWeightSum(1);

mVerticalWeekLaout.addView(mLayout);

break;

default:

break;

}

TextView l = new TextView(getContext());

l.setHeight(dip2px(TimeTableHeight * MAXNUM) + MAXNUM * 2);

l.setWidth(2);

l.setBackgroundColor(getResources().getColor(R.color.view_line));

mVerticalWeekLaout.addView(l);

mHorizontalWeekLayout.addView(getWeekVerticalLine());

}

addView(mHorizontalWeekLayout);

addView(getWeekTransverseLine());

addView(mVerticalWeekLaout);

addView(getWeekTransverseLine());

}

TimeTableModel

package com.shallcheek.timetale;

public class TimeTableModel {

private int id;

private int startnum;

private int endnum;

private int week;

private String starttime="";

private String endtime="";

private String name="";

private String teacher="";

private String classroom="";

private String weeknum="";

@Override

public String toString() {

return "TimeTableModel [id=" + id + ", startnum=" + startnum

+ ", endnum=" + endnum + ", week=" + week + ", starttime="

+ starttime + ", endtime=" + endtime + ", name=" + name

+ ", teacher=" + teacher + ", classroom=" + classroom

+ ", weeknum=" + weeknum + "]";

}

public int getId() {

return id;

}

public int getStartnum() {

return startnum;

}

public int getEndnum() {

return endnum;

}

public int getWeek() {

return week;

}

public String getStarttime() {

return starttime;

}

public String getEndtime() {

return endtime;

}

public String getName() {

return name;

}

public String getTeacher() {

return teacher;

}

public String getClassroom() {

return classroom;

}

public String getWeeknum() {

return weeknum;

}

public void setId(int id) {

this.id = id;

}

public void setStartnum(int startnum) {

this.startnum = startnum;

}

public void setEndnum(int endnum) {

this.endnum = endnum;

}

public void setWeek(int week) {

this.week = week;

}

public void setStarttime(String starttime) {

this.starttime = starttime;

}

public void setEndtime(String endtime) {

this.endtime = endtime;

}

public void setName(String name) {

this.name = name;

}

public void setTeacher(String teacher) {

this.teacher = teacher;

}

public void setClassroom(String classroom) {

this.classroom = classroom;

}

public void setWeeknum(String weeknum) {

this.weeknum = weeknum;

}

public TimeTableModel() {

// TODO Auto-generated constructor stub

}

public TimeTableModel(int id, int startnum, int endnum, int week,

String starttime, String endtime, String name, String teacher,

String classroom, String weeknum) {

super();

this.id = id;

this.startnum = startnum;

this.endnum = endnum;

this.week = week;

this.starttime = starttime;

this.endtime = endtime;

this.name = name;

this.teacher = teacher;

this.classroom = classroom;

this.weeknum = weeknum;

}

}

TimeTableView

package com.shallcheek.timetale;

import java.util.ArrayList;

import java.util.List;

import android.content.Context;

import android.graphics.Canvas;

import android.util.AttributeSet;

import android.util.Log;

import android.view.Gravity;

import android.view.View;

import android.view.ViewGroup;

import android.view.WindowManager;

import android.widget.LinearLayout;

import android.widget.TextView;

import android.widget.Toast;

/**

* 课表显示View

*

* @author shallcheek

*/

public class TimeTableView extends LinearLayout {

/**

* 配色数组

*/

public static int colors[] = {R.drawable.select_label_san,

R.drawable.select_label_er, R.drawable.select_label_si,

R.drawable.select_label_wu, R.drawable.select_label_liu,

R.drawable.select_label_qi, R.drawable.select_label_ba,

R.drawable.select_label_jiu, R.drawable.select_label_sss,

R.drawable.select_label_se, R.drawable.select_label_yiw,

R.drawable.select_label_sy, R.drawable.select_label_yiwu,

R.drawable.select_label_yi, R.drawable.select_label_wuw};

private final static int START = 0;

//最大节数

public final static int MAXNUM = 12;

//显示到星期几

public final static int WEEKNUM = 7;

//单个View高度

private final static int TimeTableHeight = 50;

//线的高度

private final static int TimeTableLineHeight = 2;

private final static int TimeTableNumWidth = 20;

private final static int TimeTableWeekNameHeight = 30;

private LinearLayout mHorizontalWeekLayout;//第一行的星期显示

private LinearLayout mVerticalWeekLaout;//课程格子

private String[] weekname = {"一", "二", "三", "四", "五", "六", "七"};

public static String[] colorStr = new String[20];

int colornum = 0;

//数据源

private List mListTimeTable = new ArrayList();

public TimeTableView(Context context) {

super(context);

}

public TimeTableView(Context context, AttributeSet attributeSet) {

super(context, attributeSet);

}

@Override

protected void onDraw(Canvas canvas) {

super.onDraw(canvas);

}

/**

* 横的分界线

*

* @return

*/

private View getWeekTransverseLine() {

TextView mWeekline = new TextView(getContext());

mWeekline.setBackgroundColor(getResources().getColor(R.color.view_line));

mWeekline.setHeight(TimeTableLineHeight);

mWeekline.setWidth(LayoutParams.FILL_PARENT);

return mWeekline;

}

/**

* 竖向分界线

*

* @return

*/

private View getWeekVerticalLine() {

TextView mWeekline = new TextView(getContext());

mWeekline.setBackgroundColor(getResources().getColor(R.color.view_line));

mWeekline.setHeight(dip2px(TimeTableWeekNameHeight));

mWeekline.setWidth((TimeTableLineHeight));

return mWeekline;

}

private void initView() {

mHorizontalWeekLayout = new LinearLayout(getContext());

mHorizontalWeekLayout.setOrientation(HORIZONTAL);

mVerticalWeekLaout = new LinearLayout(getContext());

mVerticalWeekLaout.setOrientation(HORIZONTAL);

//表格

for (int i = 0; i <= WEEKNUM; i++) {

switch (i) {

case 0:

//课表出的0,0格子 空白的

TextView mTime = new TextView(getContext());

mTime.setHeight(dip2px(TimeTableWeekNameHeight));

mTime.setWidth((dip2px(TimeTableNumWidth)));

mHorizontalWeekLayout.addView(mTime);

//绘制1~MAXNUM

LinearLayout mMonday = new LinearLayout(getContext());

ViewGroup.LayoutParams mm = new ViewGroup.LayoutParams(dip2px(TimeTableNumWidth), dip2px(MAXNUM * TimeTableHeight) + MAXNUM * 2);

mMonday.setLayoutParams(mm);

mMonday.setOrientation(VERTICAL);

for (int j = 1; j <= MAXNUM; j++) {

TextView mNum = new TextView(getContext());

mNum.setGravity(Gravity.CENTER);

mNum.setTextColor(getResources().getColor(R.color.text_color));

mNum.setHeight(dip2px(TimeTableHeight));

mNum.setWidth(dip2px(TimeTableNumWidth));

mNum.setTextSize(14);

mNum.setText(j + "");

mMonday.addView(mNum);

mMonday.addView(getWeekTransverseLine());

}

mVerticalWeekLaout.addView(mMonday);

break;

case 1:

case 2:

case 3:

case 4:

case 5:

case 6:

case 7:

// 设置显示星期一 到星期天

LinearLayout mHoriView = new LinearLayout(getContext());

mHoriView.setOrientation(VERTICAL);

TextView mWeekName = new TextView(getContext());

mWeekName.setTextColor(getResources().getColor(R.color.text_color));

mWeekName.setWidth(((getViewWidth() - dip2px(TimeTableNumWidth))) / WEEKNUM);

mWeekName.setHeight(dip2px(TimeTableWeekNameHeight));

mWeekName.setGravity(Gravity.CENTER);

mWeekName.setTextSize(16);

mWeekName.setText(weekname[i - 1]);

mHoriView.addView(mWeekName);

mHorizontalWeekLayout.addView(mHoriView);

List mListMon = new ArrayList<>();

//遍历出星期1~7的课表

for (TimeTableModel timeTableModel : mListTimeTable) {

if (timeTableModel.getWeek() == i) {

mListMon.add(timeTableModel);

}

}

//添加

LinearLayout mLayout = getTimeTableView(mListMon, i);

mLayout.setOrientation(VERTICAL);

ViewGroup.LayoutParams linearParams = new ViewGroup.LayoutParams((getViewWidth() - dip2px(20)) / WEEKNUM, LayoutParams.FILL_PARENT);

mLayout.setLayoutParams(linearParams);

mLayout.setWeightSum(1);

mVerticalWeekLaout.addView(mLayout);

break;

default:

break;

}

TextView l = new TextView(getContext());

l.setHeight(dip2px(TimeTableHeight * MAXNUM) + MAXNUM * 2);

l.setWidth(2);

l.setBackgroundColor(getResources().getColor(R.color.view_line));

mVerticalWeekLaout.addView(l);

mHorizontalWeekLayout.addView(getWeekVerticalLine());

}

addView(mHorizontalWeekLayout);

addView(getWeekTransverseLine());

addView(mVerticalWeekLaout);

addView(getWeekTransverseLine());

}

private int getViewWidth() {

WindowManager wm = (WindowManager) getContext().getSystemService(

Context.WINDOW_SERVICE);

return wm.getDefaultDisplay().getWidth();

}

private View addStartView(int startnum, final int week, final int start) {

LinearLayout mStartView = new LinearLayout(getContext());

mStartView.setOrientation(VERTICAL);

for (int i = 1; i < startnum; i++) {

TextView mTime = new TextView(getContext());

mTime.setGravity(Gravity.CENTER);

mTime.setHeight(dip2px(TimeTableHeight));

mTime.setWidth(dip2px(TimeTableHeight));

mStartView.addView(mTime);

mStartView.addView(getWeekTransverseLine());

final int num = i;

//这里可以处理空白处点击添加课表

mTime.setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

Toast.makeText(getContext(), "星期" + week + "第" + (start + num) + "节", Toast.LENGTH_LONG).show();

}

});

}

return mStartView;

}

/**

* 星期一到星期天的课表

*

* @param model

* @param week

* @return

*/

private LinearLayout getTimeTableView(List model, int week) {

LinearLayout mTimeTableView = new LinearLayout(getContext());

mTimeTableView.setOrientation(VERTICAL);

int modesize = model.size();

if (modesize <= 0) {

mTimeTableView.addView(addStartView(MAXNUM + 1, week, 0));

} else {

for (int i = 0; i < modesize; i++) {

if (i == 0) {

//添加的0到开始节数的空格

mTimeTableView.addView(addStartView(model.get(0).getStartnum(), week, 0));

mTimeTableView.addView(getMode(model.get(0)));

} else if (model.get(i).getStartnum() - model.get(i - 1).getStartnum() > 0) {

//填充

mTimeTableView.addView(addStartView(model.get(i).getStartnum() - model.get(i - 1).getEndnum(), week, model.get(i - 1).getEndnum()));

mTimeTableView.addView(getMode(model.get(i)));

}

if (i + 1 == modesize) {

mTimeTableView.addView(addStartView(MAXNUM - model.get(i).getEndnum(), week, model.get(i).getEndnum()));

}

}

}

return mTimeTableView;

}

/**

* 获取单个课表View 也可以自定义我这个

*

* @param model 数据类型

* @return

*/

@SuppressWarnings("deprecation")

private View getMode(final TimeTableModel model) {

LinearLayout mTimeTableView = new LinearLayout(getContext());

mTimeTableView.setOrientation(VERTICAL);

TextView mTimeTableNameView = new TextView(getContext());

int num = model.getEndnum() - model.getStartnum();

mTimeTableNameView.setHeight(dip2px((num + 1) * TimeTableHeight) + num * 2);

mTimeTableNameView.setTextColor(getContext().getResources().getColor(

android.R.color.white));

mTimeTableNameView.setWidth(dip2px(50));

mTimeTableNameView.setTextSize(16);

mTimeTableNameView.setGravity(Gravity.CENTER);

mTimeTableNameView.setText(model.getName() + "@" + model.getClassroom());

mTimeTableView.addView(mTimeTableNameView);

mTimeTableView.addView(getWeekTransverseLine());

mTimeTableView.setBackgroundDrawable(getContext().getResources()

.getDrawable(colors[getColorNum(model.getName())]));

mTimeTableView.setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

Toast.makeText(getContext(), model.getName() + "@" + model.getClassroom(), Toast.LENGTH_LONG).show();

}

});

return mTimeTableView;

}

/**

* 转换dp

*

* @param dpValue

* @return

*/

public int dip2px(float dpValue) {

float scale = getContext().getResources().getDisplayMetrics().density;

return (int) (dpValue * scale + 0.5f);

}

public void setTimeTable(List mlist) {

this.mListTimeTable = mlist;

for (TimeTableModel timeTableModel : mlist) {

addTimeName(timeTableModel.getName());

}

initView();

invalidate();

}

/**

* 输入课表名循环判断是否数组存在该课表 如果存在输出true并退出循环 如果不存在则存入colorSt[20]数组

*

* @param name

*/

private void addTimeName(String name) {

boolean isRepeat = true;

for (int i = 0; i < 20; i++) {

if (name.equals(colorStr[i])) {

isRepeat = true;

break;

} else {

isRepeat = false;

}

}

if (!isRepeat) {

colorStr[colornum] = name;

colornum++;

}

}

/**

* 获取数组中的课程名

*

* @param name

* @return

*/

public static int getColorNum(String name) {

int num = 0;

for (int i = 0; i < 20; i++) {

if (name.equals(colorStr[i])) {

num = i;

}

}

return num;

}

}

布局文件

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:background="@android:color/white"

android:orientation="vertical" >

android:layout_width="fill_parent"

android:layout_height="fill_parent" >

android:id="@+id/main_timetable_ly"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:orientation="vertical" >

最新版查看:查看地址

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本之家。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/266862.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

26.中继器数据的添加与删除

选择中继器里面的数据集再选择增加行 勾上之后选择下方的增加行就可以填入数据了 用变量获取用户输入的各项内容 但是图片不能用公式操作 方法&#xff1a;通过右键单击图片获得图片的地址 图片中蓝色的部分就是相对路径 把这个路径放到中继器的数据里就可以用了 以上是添加&am…

android工作机制和内核,android内核剖析学习笔记:AMS(ActivityManagerService)内部原理和工作机制...

一、ActivityManagerService提供的主要功能&#xff1a;(1)统一调度各应用程序的Activity(2)内存管理(3)进程管理二、启动一个Activity的方式有以下几种&#xff1a;(1)在应用程序中调用startActivity启动指定的Activity(2)在Home程序中单击一个应用图标&#xff0c;启动新的Ac…

从.Net到Java学习第四篇——spring boot+redis

从.Net到Java学习系列目录 “学习java已经十天&#xff0c;有时也怀念当初.net的经典&#xff0c;让这语言将你我相连&#xff0c;怀念你......”接上一篇&#xff0c;本篇使用到的框架redis、FastJSON。 环境准备 安装redis&#xff0c;下图是我本机的redis绿色版&#xff0c;…

hdu 4409 Family Name List LCA +stl

http://acm.hdu.edu.cn/showproblem.php?pid4409 赛后才过只能说悲剧了&#xff0c;知道思路&#xff0c;stl不熟悉&#xff0c;所以导致写的很慢....占据了很多时间&#xff0c;手速代码准确度。。哎。。。 题意&#xff1a; 给你一个家谱&#xff0c;n个人的姓名&#xff0c…

mysql杂记

1、 mysql安装完成后需要将mysql里面的bin目录加到环境变量里之后&#xff0c;才能在cmd窗口里使用mysql命令 2、 在CMD命令窗口敲入命令 mysql -hlocalhost -uroot -ppassword进入mysql数据库 这里我的用户名是root&#xff0c;密码是123456 转载于:https://www.cnblogs.com/y…

vue created 生命周期

在实例创建完成后被立即调用。在这一步&#xff0c;实例已完成以下的配置&#xff1a;数据观测 (data observer)&#xff0c;属性和方法的运算&#xff0c;watch/event 事件回调。然而&#xff0c;挂载阶段还没开始&#xff0c;$el属性目前不可见。 methods、data、watch等可以…

android cne服务,Android内存优化-了解内存篇

查看系统内存文件shellaries:/ $ cat /proc/meminfoMemTotal: 1970216 kBMemFree: 83756 kBBuffers: 156020 kBCached: 702516 kBSwapCached: 0 kBActive: 1160284 kBInactive: 397932 kBActive(anon): 778932 kBInactive(anon): 2228 kBActive(file): 381352 kBInactive(file)…

Shell中的特殊字符

通配符 当需要用命令处理一组文件&#xff0c;例如file1.txt、file2.txt、file3.txt……&#xff0c;用 户不必一一输入文件名&#xff0c;可以使用Shell通配符。Shell命令的通配符含义如下表 引号 在 Shell 中引号分为 2 种&#xff1a;单引号、双引号。 &#xff08; 1 &…

android的帧布局,七、Android帧布局FrameLayout和霓虹灯效果

帧布局容器为每个加入其中的组件创建一个空白的区域(称为一帧)&#xff0c;所有每个子组件占据一帧&#xff0c;这些帧都会根据gravity属性执行自动对齐。FrameLayout的常用XML属性和相关方法XML属性相关方法说  明android:foregroundsetForeground(Drawable)设置该帧布局容器…

flutter能开发游戏吗_Steam上架游戏开发软件,不用代码也能制作游戏,而且还是免费的...

时代在变化&#xff0c;科技在进步&#xff0c;曾几何时我们一度以为的高科技&#xff0c;在现在看来也不过是平常到不能再平常的东西。游戏开发也一样&#xff0c;以前需要代码才能开发制作而成&#xff0c;现如今都不需要了&#xff0c;直接编辑就OK&#xff0c;Steam商城这次…

快速构建Windows 8风格应用10-设备方向

本篇博文主要介绍常用支持Windows 8操作系统设备的方向、如何获取当前设备方向、DisplayProperties类 常用支持Windows 8操作系统设备的方向在我们常用的设备当中&#xff0c;Windows 8是通过什么来监控设备方向呢&#xff1f;答案是方向传感器&#xff0c;那么对于设备的不同方…

CSDN怎么转载别人的博客

参考&#xff1a;CSDN怎么转载别人的博客 作者&#xff1a;zhongjianblackberry 发布时间&#xff1a;2018-03-06 11:57:59 网址&#xff1a;https://blog.csdn.net/zhongjianblackberry/article/details/79456338 目录转载CSDN博客步骤&#xff1a;Markdown和HTML相关小知识Ma…

青岛西海岸惠普大数据_青岛西海岸新区用好卫星大数据 为城市治理全面赋能...

来源&#xff1a;环球网为推进城市治理数字化程度&#xff0c;提升城市治理的智能化和精细化水平&#xff0c;青岛西海岸新区搭建了人工智能搜索视觉分析平台&#xff0c;以月度更新的频率&#xff0c;汇聚了新区0.5米高分辨率卫星影像数据&#xff0c;通过数据资源共享系统为各…

总结jenkins Android自动打包遇到的坑

一、ndk-build报错 [roothejianlai-jenkins LearnGradle]# ndk-build /usr/local/android-ndk-r8/ndk-build: /usr/local/android-ndk-r8/prebuilt/linux-x86/bin/make: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory 解决方法&#xff1a;安装glibc.i6…

android的热修复,Android热修复原理

热修复框架技术主要有三类&#xff0c;代码修复&#xff0c;资源修复&#xff0c;动态链接库修复。资源修复很多资源修复的框架参考了Instant Run资源修复的原理&#xff0c;所以先了解一下Instant RunInstant RunInstant Run是Android Studio 2.0以后新增的一个运行机制&#…

树莓派的四种登陆方式

参考&#xff1a;树莓派的4种登陆方式 作者&#xff1a;丶PURSUING 发布时间&#xff1a;2021-02-02 09:15:30 网址&#xff1a;https://blog.csdn.net/weixin_44742824/article/details/113524929?spm1001.2014.3001.5502 目录一、HDMI视频线二、串口1.修改sd卡中的系统文件2…

丰收互联蓝牙key怎么开机_ublox收购Rigado的蓝牙模块业务,扩大蓝牙低功耗产品组合...

全球领先的定位与无线通讯技术供应商u-blox 宣布&#xff0c;已与 Rigado签署资产购买协议&#xff0c;收购其蓝牙模块业务。Rigado是商业物联网Edge-as-a-Service(EaaS)边缘即服务网关解决方案的领先供应商&#xff0c;于2015年开始提供通过认证的无线模块。强化蓝牙产品系列此…

好的编程风格

1。关键字 if, while, for 后有一个空格 2。号之类的双目运算符两侧都有空格 3。后缀运算符和操作数之间不加空格 例如 s.a , foo(argu) , a[i] 4。, 号和 ; 号之后要加空格&#xff0c;例如 foo(argu1, argu2) for (i0; i<20; i) 5。关于双目运算符两侧加空格可以灵活规定&…

android 时间戳 时区,三句话理解时区与时间戳

从不浪费时间的人&#xff0c;没有工夫抱怨时间不够。 —— 杰弗逊第一句话&#xff1a;时间戳时间不分东西南北、在地球的每一个角落都是相同的。他们都有一个相同的名字&#xff0c;叫时间戳。时间戳 指的就是Unix时间戳(Unix timestamp)。它也被称为Unix时间(Unix time)、PO…

windows下的diskpart指令彻底格式化清除U盘

参考&#xff1a;windows下的diskpart指令修复U盘分区 作者&#xff1a;丶PURSUING 发布时间&#xff1a;2021-02-02 09:38:55 网址&#xff1a;https://blog.csdn.net/weixin_44742824/article/details/113537038?spm1001.2014.3001.5501 参考&#xff1a;原文链接 作者&…