这是main里面的所有代码,按版本修改过

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hui.tally"> <application
android:name=".UniteApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MonthChartActivity"></activity>
<activity android:name=".SettingActivity" />
<activity android:name=".HistoryActivity" />
<activity android:name=".AboutActivity" />
<activity android:name=".SearchActivity" />
<activity android:name=".RecordActivity" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application> </manifest>
package com.hui.tally;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View; public class AboutActivity extends AppCompatActivity { @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
} public void onClick(View view) {
finish();
}
}
package com.hui.tally;

import androidx.appcompat.app.AppCompatActivity;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.TextView; import com.hui.tally.adapter.AccountAdapter;
import com.hui.tally.db.AccountBean;
import com.hui.tally.db.DBManager;
import com.hui.tally.utils.CalendarDialog; import java.util.ArrayList;
import java.util.Calendar;
import java.util.List; public class HistoryActivity extends AppCompatActivity {
ListView historyLv;
TextView timeTv; List<AccountBean>mDatas;
AccountAdapter adapter;
int year,month;
int dialogSelPos = -1;
int dialogSelMonth = -1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_history);
historyLv = findViewById(R.id.history_lv);
timeTv = findViewById(R.id.history_tv_time);
mDatas = new ArrayList<>();
// 设置适配器
adapter = new AccountAdapter(this,mDatas);
historyLv.setAdapter(adapter);
initTime();
timeTv.setText(year+"年"+month+"月");
loadData(year,month);
setLVClickListener();
}
/*设置ListView每一个item的长按事件*/
private void setLVClickListener() {
historyLv.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
AccountBean accountBean = mDatas.get(position);
deleteItem(accountBean);
return false;
}
});
} private void deleteItem(final AccountBean accountBean) {
final int delId = accountBean.getId();
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("提示信息").setMessage("您确定要删除这条记录么?")
.setNegativeButton("取消",null)
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
DBManager.deleteItemFromAccounttbById(delId);
mDatas.remove(accountBean); //实时刷新,从数据源删除
adapter.notifyDataSetChanged();
}
});
builder.create().show();
} /* 获取指定年份月份收支情况的列表*/
private void loadData(int year,int month) {
List<AccountBean> list = DBManager.getAccountListOneMonthFromAccounttb(year, month);
mDatas.clear();
mDatas.addAll(list);
adapter.notifyDataSetChanged();
} private void initTime() {
Calendar calendar = Calendar.getInstance();
year = calendar.get(Calendar.YEAR);
month = calendar.get(Calendar.MONTH)+1;
} public void onClick(View view) {
switch (view.getId()) {
case R.id.history_iv_back:
finish();
break;
case R.id.history_iv_rili:
CalendarDialog dialog = new CalendarDialog(this,dialogSelPos,dialogSelMonth);
dialog.show();
dialog.setDialogSize();
dialog.setOnRefreshListener(new CalendarDialog.OnRefreshListener() {
@Override
public void onRefresh(int selPos, int year, int month) {
timeTv.setText(year+"年"+month+"月");
loadData(year,month);
dialogSelPos = selPos;
dialogSelMonth = month;
}
});
break;
}
}
}
package com.hui.tally;

import androidx.appcompat.app.AppCompatActivity;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.method.HideReturnsTransformationMethod;
import android.text.method.PasswordTransformationMethod;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView; import com.hui.tally.adapter.AccountAdapter;
import com.hui.tally.db.AccountBean;
import com.hui.tally.db.DBManager;
import com.hui.tally.utils.BudgetDialog;
import com.hui.tally.utils.MoreDialog; import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.Set; public class MainActivity extends AppCompatActivity implements View.OnClickListener {
ListView todayLv; //展示今日收支情况的ListView
ImageView searchIv;
Button editBtn;
ImageButton moreBtn;
//声明数据源
List<AccountBean>mDatas;
AccountAdapter adapter;
int year,month,day;
//头布局相关控件
View headerView;
TextView topOutTv,topInTv,topbudgetTv,topConTv;
ImageView topShowIv;
SharedPreferences preferences;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initTime();
initView();
preferences = getSharedPreferences("budget", Context.MODE_PRIVATE);
//添加ListView的头布局
addLVHeaderView();
mDatas = new ArrayList<>();
//设置适配器:加载每一行数据到列表当中
adapter = new AccountAdapter(this, mDatas);
todayLv.setAdapter(adapter);
}
/** 初始化自带的View的方法*/
private void initView() {
todayLv = findViewById(R.id.main_lv);
editBtn = findViewById(R.id.main_btn_edit);
moreBtn = findViewById(R.id.main_btn_more);
searchIv = findViewById(R.id.main_iv_search);
editBtn.setOnClickListener(this);
moreBtn.setOnClickListener(this);
searchIv.setOnClickListener(this);
setLVLongClickListener();
}
/** 设置ListView的长按事件*/
private void setLVLongClickListener() {
todayLv.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
if (position == 0) { //点击了头布局
return false;
}
int pos = position-1;
AccountBean clickBean = mDatas.get(pos); //获取正在被点击的这条信息 //弹出提示用户是否删除的对话框
showDeleteItemDialog(clickBean);
return false;
}
});
}
/* 弹出是否删除某一条记录的对话框*/
private void showDeleteItemDialog(final AccountBean clickBean) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("提示信息").setMessage("您确定要删除这条记录么?")
.setNegativeButton("取消",null)
.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
int click_id = clickBean.getId();
//执行删除的操作
DBManager.deleteItemFromAccounttbById(click_id);
mDatas.remove(clickBean); //实时刷新,移除集合当中的对象
adapter.notifyDataSetChanged(); //提示适配器更新数据
setTopTvShow(); //改变头布局TextView显示的内容
}
});
builder.create().show(); //显示对话框
} /** 给ListView添加头布局的方法*/
private void addLVHeaderView() {
//将布局转换成View对象
headerView = getLayoutInflater().inflate(R.layout.item_mainlv_top, null);
todayLv.addHeaderView(headerView);
//查找头布局可用控件
topOutTv = headerView.findViewById(R.id.item_mainlv_top_tv_out);
topInTv = headerView.findViewById(R.id.item_mainlv_top_tv_in);
topbudgetTv = headerView.findViewById(R.id.item_mainlv_top_tv_budget);
topConTv = headerView.findViewById(R.id.item_mainlv_top_tv_day);
topShowIv = headerView.findViewById(R.id.item_mainlv_top_iv_hide); topbudgetTv.setOnClickListener(this);
headerView.setOnClickListener(this);
topShowIv.setOnClickListener(this); }
/* 获取今日的具体时间*/
private void initTime() {
Calendar calendar = Calendar.getInstance();
year = calendar.get(Calendar.YEAR);
month = calendar.get(Calendar.MONTH)+1;
day = calendar.get(Calendar.DAY_OF_MONTH);
} // 当activity获取焦点时,会调用的方法
@Override
protected void onResume() {
super.onResume();
loadDBData();
setTopTvShow();
}
/* 设置头布局当中文本内容的显示*/
private void setTopTvShow() {
//获取今日支出和收入总金额,显示在view当中
float incomeOneDay = DBManager.getSumMoneyOneDay(year, month, day, 1);
float outcomeOneDay = DBManager.getSumMoneyOneDay(year, month, day, 0);
String infoOneDay = "今日支出 ¥"+outcomeOneDay+" 收入 ¥"+incomeOneDay;
topConTv.setText(infoOneDay);
// 获取本月收入和支出总金额
float incomeOneMonth = DBManager.getSumMoneyOneMonth(year, month, 1);
float outcomeOneMonth = DBManager.getSumMoneyOneMonth(year, month, 0);
topInTv.setText("¥"+incomeOneMonth);
topOutTv.setText("¥"+outcomeOneMonth); // 设置显示运算剩余
float bmoney = preferences.getFloat("bmoney", 0);//预算
if (bmoney == 0) {
topbudgetTv.setText("¥ 0");
}else{
float syMoney = bmoney-outcomeOneMonth;
topbudgetTv.setText("¥"+syMoney);
}
} // 加载数据库数据
private void loadDBData() {
List<AccountBean> list = DBManager.getAccountListOneDayFromAccounttb(year, month, day);
mDatas.clear();
mDatas.addAll(list);
adapter.notifyDataSetChanged();
} @Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.main_iv_search:
Intent it = new Intent(this, SearchActivity.class); //跳转界面
startActivity(it);
break;
case R.id.main_btn_edit:
Intent it1 = new Intent(this, RecordActivity.class); //跳转界面
startActivity(it1);
break;
case R.id.main_btn_more:
MoreDialog moreDialog = new MoreDialog(this);
moreDialog.show();
moreDialog.setDialogSize();
break;
case R.id.item_mainlv_top_tv_budget:
showBudgetDialog();
break;
case R.id.item_mainlv_top_iv_hide:
// 切换TextView明文和密文
toggleShow();
break;
}
if (v == headerView) {
//头布局被点击了
Intent intent = new Intent();
intent.setClass(this, MonthChartActivity.class);
startActivity(intent);
}
}
/** 显示运算设置对话框*/
private void showBudgetDialog() {
BudgetDialog dialog = new BudgetDialog(this);
dialog.show();
dialog.setDialogSize();
dialog.setOnEnsureListener(new BudgetDialog.OnEnsureListener() {
@Override
public void onEnsure(float money) {
//将预算金额写入到共享参数当中,进行存储
SharedPreferences.Editor editor = preferences.edit();
editor.putFloat("bmoney",money);
editor.commit();
//计算剩余金额
float outcomeOneMonth = DBManager.getSumMoneyOneMonth(year, month, 0);
float syMoney = money-outcomeOneMonth;//预算剩余 = 预算-支出
topbudgetTv.setText("¥"+syMoney);
}
});
} boolean isShow = true;
/**
* 点击头布局眼睛时,如果原来是明文,就加密,如果是密文,就显示出来
* */
private void toggleShow() {
if (isShow) { //明文====》密文
PasswordTransformationMethod passwordMethod = PasswordTransformationMethod.getInstance();
topInTv.setTransformationMethod(passwordMethod); //设置隐藏
topOutTv.setTransformationMethod(passwordMethod); //设置隐藏
topbudgetTv.setTransformationMethod(passwordMethod); //设置隐藏
topShowIv.setImageResource(R.mipmap.ih_hide);
isShow = false; //设置标志位为隐藏状态
}else{ //密文---》明文
HideReturnsTransformationMethod hideMethod = HideReturnsTransformationMethod.getInstance();
topInTv.setTransformationMethod(hideMethod); //设置隐藏
topOutTv.setTransformationMethod(hideMethod); //设置隐藏
topbudgetTv.setTransformationMethod(hideMethod); //设置隐藏
topShowIv.setImageResource(R.mipmap.ih_show);
isShow = true; //设置标志位为隐藏状态
}
}
}
package com.hui.tally;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager; import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView; import com.hui.tally.adapter.ChartVPAdapter;
import com.hui.tally.db.DBManager;
import com.hui.tally.frag_chart.IncomChartFragment;
import com.hui.tally.frag_chart.OutcomChartFragment;
import com.hui.tally.utils.CalendarDialog; import java.util.ArrayList;
import java.util.Calendar;
import java.util.List; public class MonthChartActivity extends AppCompatActivity {
Button inBtn,outBtn;
TextView dateTv,inTv,outTv;
ViewPager chartVp;
int year;
int month;
int selectPos = -1,selectMonth =-1;
List<Fragment>chartFragList;
private IncomChartFragment incomChartFragment;
private OutcomChartFragment outcomChartFragment;
private ChartVPAdapter chartVPAdapter; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_month_chart);
initView();
initTime();
initStatistics(year,month);
initFrag();
setVPSelectListener();
} private void setVPSelectListener() {
chartVp.addOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener(){
@Override
public void onPageSelected(int position) {
setButtonStyle(position);
}
});
} private void initFrag() {
chartFragList = new ArrayList<>();
// 添加Fragment的对象
incomChartFragment = new IncomChartFragment();
outcomChartFragment = new OutcomChartFragment();
// 添加数据到Fragment当中
Bundle bundle = new Bundle();
bundle.putInt("year",year);
bundle.putInt("month",month);
incomChartFragment.setArguments(bundle);
outcomChartFragment.setArguments(bundle);
// 将Fragment添加到数据源当中
chartFragList.add(outcomChartFragment);
chartFragList.add(incomChartFragment);
// 使用适配器
chartVPAdapter = new ChartVPAdapter(getSupportFragmentManager(), chartFragList);
chartVp.setAdapter(chartVPAdapter);
// 将Fragment加载到Acitivy当中
} /* 统计某年某月的收支情况数据*/
private void initStatistics(int year, int month) {
float inMoneyOneMonth = DBManager.getSumMoneyOneMonth(year, month, 1); //收入总钱数
float outMoneyOneMonth = DBManager.getSumMoneyOneMonth(year, month, 0); //支出总钱数
int incountItemOneMonth = DBManager.getCountItemOneMonth(year, month, 1); //收入多少笔
int outcountItemOneMonth = DBManager.getCountItemOneMonth(year, month, 0); //支出多少笔
dateTv.setText(year+"年"+month+"月账单");
inTv.setText("共"+incountItemOneMonth+"笔收入, ¥ "+inMoneyOneMonth);
outTv.setText("共"+outcountItemOneMonth+"笔支出, ¥ "+outMoneyOneMonth); } /** 初始化时间的方法*/
private void initTime() {
Calendar calendar = Calendar.getInstance();
year = calendar.get(Calendar.YEAR);
month = calendar.get(Calendar.MONTH)+1;
} /** 初始化控件*/
private void initView() {
inBtn = findViewById(R.id.chart_btn_in);
outBtn = findViewById(R.id.chart_btn_out);
dateTv = findViewById(R.id.chart_tv_date);
inTv = findViewById(R.id.chart_tv_in);
outTv = findViewById(R.id.chart_tv_out);
chartVp = findViewById(R.id.chart_vp);
} public void onClick(View view) {
switch (view.getId()) {
case R.id.chart_iv_back:
finish();
break;
case R.id.chart_iv_rili:
showCalendarDialog();
break;
case R.id.chart_btn_in:
setButtonStyle(1);
chartVp.setCurrentItem(1);
break;
case R.id.chart_btn_out:
setButtonStyle(0);
chartVp.setCurrentItem(0);
break;
}
}
/* 显示日历对话框*/
private void showCalendarDialog() {
CalendarDialog dialog = new CalendarDialog(this, selectPos, selectMonth);
dialog.show();
dialog.setDialogSize();
dialog.setOnRefreshListener(new CalendarDialog.OnRefreshListener() {
@Override
public void onRefresh(int selPos, int year, int month) {
MonthChartActivity.this.selectPos = selPos;
MonthChartActivity.this.selectMonth = month;
initStatistics(year,month);
incomChartFragment.setDate(year,month);
outcomChartFragment.setDate(year,month);
}
});
} /* 设置按钮样式的改变 支出-0 收入-1*/
private void setButtonStyle(int kind){
if (kind == 0) {
outBtn.setBackgroundResource(R.drawable.main_recordbtn_bg);
outBtn.setTextColor(Color.WHITE);
inBtn.setBackgroundResource(R.drawable.dialog_btn_bg);
inBtn.setTextColor(Color.BLACK);
}else if (kind == 1){
inBtn.setBackgroundResource(R.drawable.main_recordbtn_bg);
inBtn.setTextColor(Color.WHITE);
outBtn.setBackgroundResource(R.drawable.dialog_btn_bg);
outBtn.setTextColor(Color.BLACK);
}
}
}
package com.hui.tally;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager; import android.os.Bundle;
import android.view.View; import com.google.android.material.tabs.TabLayout;
import com.hui.tally.adapter.RecordPagerAdapter;
import com.hui.tally.frag_record.IncomeFragment;
import com.hui.tally.frag_record.BaseRecordFragment;
import com.hui.tally.frag_record.OutcomeFragment; import java.util.ArrayList;
import java.util.List; public class RecordActivity extends AppCompatActivity {
TabLayout tabLayout;
ViewPager viewPager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_record);
//1.查找控件
tabLayout = findViewById(R.id.record_tabs);
viewPager = findViewById(R.id.record_vp);
//2.设置ViewPager加载页面
initPager();
} private void initPager() {
// 初始化ViewPager页面的集合
List<Fragment>fragmentList = new ArrayList<>();
// 创建收入和支出页面,放置在Fragment当中
OutcomeFragment outFrag = new OutcomeFragment(); //支出
IncomeFragment inFrag = new IncomeFragment(); //收入
fragmentList.add(outFrag);
fragmentList.add(inFrag); // 创建适配器
RecordPagerAdapter pagerAdapter = new RecordPagerAdapter(getSupportFragmentManager(), fragmentList);
// 设置适配器
viewPager.setAdapter(pagerAdapter);
//将TabLayout和ViwePager进行关联
tabLayout.setupWithViewPager(viewPager);
} /* 点击事件*/
public void onClick(View view) {
switch (view.getId()) {
case R.id.record_iv_back:
finish();
break;
}
}
}
package com.hui.tally;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast; import com.hui.tally.adapter.AccountAdapter;
import com.hui.tally.db.AccountBean;
import com.hui.tally.db.DBManager; import java.util.ArrayList;
import java.util.List; public class SearchActivity extends AppCompatActivity {
ListView searchLv;
EditText searchEt;
TextView emptyTv;
List<AccountBean>mDatas; //数据源
AccountAdapter adapter; //适配器对象
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_search);
initView();
mDatas = new ArrayList<>();
adapter = new AccountAdapter(this,mDatas);
searchLv.setAdapter(adapter);
searchLv.setEmptyView(emptyTv); //设置无数局时,显示的控件
} private void initView() {
searchEt = findViewById(R.id.search_et);
searchLv = findViewById(R.id.search_lv);
emptyTv = findViewById(R.id.search_tv_empty);
} public void onClick(View view) {
switch (view.getId()) {
case R.id.search_iv_back:
finish();
break;
case R.id.search_iv_sh: //执行搜索的操作
String msg = searchEt.getText().toString().trim();
// 判断输入内容是否为空,如果为空,就提示不能搜索
if (TextUtils.isEmpty(msg)) {
Toast.makeText(this,"输入内容不能为空!",Toast.LENGTH_SHORT).show();
return;
}
//开始搜索
List<AccountBean> list = DBManager.getAccountListByRemarkFromAccounttb(msg);
mDatas.clear();
mDatas.addAll(list);
adapter.notifyDataSetChanged();
break;
}
}
}

  

package com.hui.tally;

import androidx.appcompat.app.AppCompatActivity;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast; import com.hui.tally.db.DBManager; public class SettingActivity extends AppCompatActivity { @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_setting);
} public void onClick(View view) {
switch (view.getId()) {
case R.id.setting_iv_back:
finish();
break;
case R.id.setting_tv_clear:
showDeleteDialog();
break;
}
} private void showDeleteDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("删除提示")
.setMessage("您确定要删除所有记录么?\n注意:删除后无法恢复,请慎重选择!")
.setPositiveButton("取消",null)
.setNegativeButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
DBManager.deleteAllAccount();
Toast.makeText(SettingActivity.this,"删除成功!",Toast.LENGTH_SHORT).show();
}
});
builder.create().show();
}
}
package com.hui.tally;

import android.app.Application;

import com.hui.tally.db.DBManager;

/* 表示全局应用的类*/
public class UniteApp extends Application {
@Override
public void onCreate() {
super.onCreate();
// 初始化数据库
DBManager.initDB(getApplicationContext());
}
}

基本所有的代码都在里面了,图片什么的未展示

Android 开发Day10的更多相关文章

  1. Android学习探索之Java 8 在Android 开发中的应用

    前言: Java 8推出已经将近2年多了,引入很多革命性变化,加入了函数式编程的特征,使基于行为的编程成为可能,同时减化了各种设计模式的实现方式,是Java有史以来最重要的更新.但是Android上, ...

  2. Android 开发一定要看的15个实战项目

    前言: 虽说网上有太多的Android课程,但是大多都是视频,有Android在线开发环境的几乎没有,但是对于学习Android的人来说拥有在线的Android开发环境是非常好的,可以随时动手操作学习 ...

  3. Android开发学习之路-关于Exception

    Exception在Java中是表示异常的一个类.它是Throwable的子类. 而Exception的子类RuntimeException是一个特殊的异常类,在代码中不需要对此类进行throw,而是 ...

  4. Android开发学习之路-Android中使用RxJava

    RxJava的核心内容很简单,就是进行异步操作.类似于Handler和AsyncTask的功能,但是在代码结构上不同. RxJava使用了观察者模式和建造者模式中的链式调用(类似于C#的LINQ). ...

  5. Android开发学习之路-记一次CSDN公开课

    今天的CSDN公开课Android事件处理重难点快速掌握中老师讲到一个概念我觉得不正确. 原话是这样的:点击事件可以通过事件监听和回调两种方法实现. 我一听到之后我的表情是这样的: 这跟我学的看的都不 ...

  6. Android开发学习之路-RecyclerView滑动删除和拖动排序

    Android开发学习之路-RecyclerView使用初探 Android开发学习之路-RecyclerView的Item自定义动画及DefaultItemAnimator源码分析 Android开 ...

  7. Android开发-之监听button点击事件

    一.实现button点击事件的方法 实现button点击事件的监听方法有很多种,这里总结了常用的四种方法: 1.匿名内部类 2.外部类(独立类) 3.实现OnClickListener接口 4.添加X ...

  8. Android 开发环境在 Windows7 下的部署安装

    Android SDK Android SDK 为 Android 应用的开发.测试和调试提了必要的API库和开发工具. ADT Bundle 下载 如果你是一个android 开发新手,推荐你下载使 ...

  9. Android开发之自定义的ListView(UITableViewController)

    Android开发中的ListView, 顾名方法思义,就是表视图.表示图在iOS开发中就是TableView.两者虽然名称不一样,但是其使用方法,使用场景以及该控件的功能都极为相似,都是用来展示大量 ...

  10. Android开发之自定义组件和接口回调

    说到自定义控件不得不提的就是接口回调,在Android开发中接口回调用的还是蛮多的.在这篇博客开始的时候呢,我想聊一下iOS的自定义控件.在iOS中自定义控件的思路是继承自UIView, 在UIVie ...

随机推荐

  1. 《ASP.ENT Core 与 RESTful API 开发实战》-- (第5章)-- 读书笔记(中)

    第 5 章 使用 Entity Framework Core 5.3 重构仓储类 创建一个通用仓储接口 namespace Library.API.Services { public interfac ...

  2. Linux-计算毫秒数

    date +%s返回自划时代以来的秒数. date +%s%N返回秒数+当前纳秒数. 因此,echo $(($(date +%s%N)/1000000))是你需要的毫秒数 date +"%T ...

  3. 基于C#的屏幕鼠标跟随圈圈应用 - 开源研究系列文章

    去年8月的时候无聊,想起博客网页中的鼠标跟随圈圈效果,于是就想用C#在Windows操作系统级别的基础上去开发一个类似的应用,于是有了此文.上次在博问里也发帖咨询了一下( https://q.cnbl ...

  4. Blazor OIDC 单点登录授权实例5 - 独立SSR App (net8 webapp ) 端授权

    目录: OpenID 与 OAuth2 基础知识 Blazor wasm Google 登录 Blazor wasm Gitee 码云登录 Blazor OIDC 单点登录授权实例1-建立和配置IDS ...

  5. 惠普CP1025后盖传感器松导致不停自检或打印中掉电, 跳闪三角灯

    上次修了离合器, 没出两星期又出问题了. CP1025这个型号就是出名的开机特别慢, 正常自检是1分钟, 但是前天我在给机器换完粉盒后, 自检似乎进入了死循环, 一直在自检. 周末才有空看看能不能解决 ...

  6. 【Unity3D】人机交互Input

    1 前言 ​ Input 是 Unity3D 中用于人机交互的工具类,用户可以调用其 GetKey.GetMousePosition.GetMouseButton.GetAxis.GetButton ...

  7. 开年喜报!Walrus成功入选CNCF云原生全景图

    近日,数澈软件 Seal (以下简称"Seal")旗下开源应用管理平台 Walrus 成功入选云原生计算基金会全景图(CNCF Landscape)并收录至 "App D ...

  8. win32- 函数运行速度测试

    LARGE_INTEGER nFreq, t1, t2; int loop_count = 0; double dt; double time_sum = 0; QueryPerformanceFre ...

  9. Excel联动(wps)

    Excel联动(wps) https://www.wps.cn/learning/course/detail/id/330423.html demo: https://files.cnblogs.co ...

  10. 【笔记】css —— BFC 原理

    一.什么是 BFC BFC 即 Block Formatting Contexts (块级格式化上下文),具有 BFC 特性的元素可以看作是隔离了的独立容器,容器里面的元素不会在布局上影响到外面的元素 ...