Android碧水剑之DatePickerDialog、TimePickerDialog之岁月如梭

360°全景影像移动端类库--PanoramaGL 介绍         本指南将介绍一个PanoramaGL 0.1类库的简单用法,更多的细节请签出HelloPanoramaGL示例查看。 细节 1如何导入PanoramaGL类库? 1.1从源代码中导入 a下载PanoramaGL_0.1.zip或从代码仓库下载源代码 b如果你下载zip文件然后解压该文件 c在Eclipse中导入PanoramaGL项目: 点击“File”选择“ 阅读详情

传送门 ☞ Android兵器谱 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229


碧水剑
        岳灵珊转头向山谷瞧了一眼,叫道:“这把剑,这把剑!”令狐冲又是一惊,知道小师妹的长剑是一口断金削铁的利器,叫做“碧水剑”,三年前师父在浙江龙泉得来,小师妹一见之下爱不释手,向师父连求数次,师父始终不给,直至今年她十八岁生日,师父才给了她当生日礼物,这一下堕入了深谷,再也难以取回,今次当真是铸成大错了。

        今天我们学习如何利用Android平台“碧水剑”DatePickerDialog、TimePickerDialog来显示日期时间对话框,下面给出该情景的案例:

一、案例技术要点

1.时间选择对话框构造方法:new TimePickerDialog(...)。
第二个参数表示引入时间设置监听器对象MyTimeSetListener
最后一个参数标示是否按24小时制显示
2.日期选择对话框构造方法:new DatePickerDialog(...)。
第二个参数表示引入日期设置监听器对象MyDateSetListener
3.为TimePickerDialog新增自定义的时间设置监听MyTimeSetListener,并且实现OnTimeSetListener接口的onTimeSet(...)方法。
4.为DatePickerDialog新增自定义的日期设置监听MyDateSetListener,并且实现OnDateSetListener接口的onDateSet(...)方法。

二、案例代码陈列

AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.clock"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".DateTimePickerDialogMainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
strings.xml
<resources>
    <string name="app_name">DateTimePickerDialog显示日期时间对话框</string>
</resources>
main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <AnalogClock
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />
    
    <DigitalClock 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="18sp"/>
    
    <Button 
        android:id="@+id/button1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="显示TimePickDialog" />
    
    <Button 
        android:id="@+id/button2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="显示DatePickDialog" />
</LinearLayout>
DateTimePickerDialogMainActivity.java
package com.android.clock;

import java.util.Calendar;

import android.app.Activity;
import android.app.DatePickerDialog;
import android.app.DatePickerDialog.OnDateSetListener;
import android.app.TimePickerDialog;
import android.app.TimePickerDialog.OnTimeSetListener;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.TimePicker;
import android.widget.Toast;

/**
 * DatePickerDialog、TimePickerDialog案例:日期时间显示对话框
 * @author lynnli1229
 */
public class DateTimePickerDialogMainActivity extends Activity implements OnClickListener {
    private Button button1, button2;
    private int hourOfDay, minute, year, monthOfYear, dayOfMonth;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        button1 = (Button) findViewById(R.id.button1);
        button2 = (Button) findViewById(R.id.button2);
        button1.setOnClickListener(this);
        button2.setOnClickListener(this);
        //获取当前时间
        Calendar calendar = Calendar.getInstance();
        year = calendar.get(Calendar.YEAR);
        monthOfYear = calendar.get(Calendar.MONTH);
        dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH);
        hourOfDay = calendar.get(Calendar.HOUR_OF_DAY);
        minute = calendar.get(Calendar.MINUTE);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
        case R.id.button1:
            TimePickerDialog timePickerDialog = new TimePickerDialog(this, new MyTimeSetListener(), hourOfDay, minute, true);
            timePickerDialog.show();
            break;

        case R.id.button2:
            DatePickerDialog datePickerDialog = new DatePickerDialog(this, new MyDateSetListener(), year, monthOfYear, dayOfMonth);
            datePickerDialog.show();
            break;
        }
        
    }

    private class MyTimeSetListener implements OnTimeSetListener {
        @Override
        public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
            Toast.makeText(DateTimePickerDialogMainActivity.this, "hourOfDay: " + hourOfDay + ", minute: " + minute, Toast.LENGTH_LONG).show();
        }
    }

    private class MyDateSetListener implements OnDateSetListener {
        @Override
        public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
            Toast.makeText(DateTimePickerDialogMainActivity.this, "year: " + year + ", monthOfYear: " + monthOfYear + ", dayOfMonth: " + dayOfMonth, Toast.LENGTH_LONG).show();
        }
        
    }
}
三、案例效果展示
       
如何高效使用和管理Bitmap--图片缓存管理模块的设计与实现 传送门 ☞ 轮子的专栏 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229         上周为360全景项目引入了图片缓存模块。因为是在Android4.0平台以上运作,出于惯性,都会设计之前查阅相关资料,尽量避免拿一些以前2.3平台积累的经验来进行类比处理。开发文档中有一个BitmapFun的示例,仔细拜读了一下,虽说围绕着Bitmap的方方面面讲 阅读详情

相关推荐

基于springboot医院医疗仪器管理系统

基于Spring Boot的医院医疗仪器管理系统是一款专门为医院设计的高效管理工具。

2201_75927219的博客 1012

安卓调用系统日历控件:DatePicker与DatePickerDialog

[html] view plain copy print?&amp;amp;amp;lt;?xml&amp;amp;amp;nbsp;version=“1.0”&amp;amp;amp;nbsp;encoding=“utf-8”?&amp;amp;amp;gt;&amp;amp;amp;nbsp;&amp;amp;amp;nbsp;&amp;amp;amp;lt;LinearLay

hizhangyuping的博客 4351

低功耗模式下的看门狗使用

最近用国产芯片AT32在做一个低功耗的项目,为了实现低功耗模式下的定时唤醒,我选择的是使用相对比较简单的看门狗来做,下面就分享一下使用过程~ 为了最大限度的降低功耗,我用的是待机模式,先看看几种低功耗模式以及唤醒的区别: 而看门狗AT32提供了两种,分别是独立看门狗(IWDG)和窗口看门狗(WWDG),其区别大概有以下几点: 1、独立看门狗(IWDG)由专用的低速时钟(LSI)驱动,即使主时钟发生故障它也仍然有效;窗口看门狗由从 APB1 时钟分频后得到的时钟驱动,通过可配置的时间窗口来检测应用程序非正常

dc18883988396的博客 3028

一起Talk Android吧(第四百四十六回:UI控件之DatePickerDialog)

本章回中主要介绍了DatePickerDialog的使用方法,并且通过文字结合代码的方式进行了讲解。

talk_8的专栏 527

WSL2不能上网,Failed to connect to github.com port 443问题解决方案

WSL2不能上网: 问题:ping外网无效 例如:ping www.baidu.com失败 解决方案: 在wsl: $sudo vi /etc/wsl.conf wsl.conf: [network] generateResolvConf = false 在PowerShell: $sudo vi /etc/etc/resolv.conf resolv.conf: # This file was automatically generated by WSL. To stop automatic gen

Jason_Chen__的博客 9525

第18届全国大学生智能汽车竞赛四轮车开源讲解【2.5】-- 图像处理实战:从二值化到边缘检测的工程优化

本文深入讲解了第18届全国大学生智能汽车竞赛四轮车开源项目中图像处理的核心实战技术。文章聚焦于二值化与边缘检测两大关键环节,详细对比了大津法与索贝尔算子的工程应用与优化策略,并分享了遮光、偏振片等物理抗干扰技巧,旨在帮助参赛者构建稳定高效的图像预处理流水线,为赛道识别奠定坚实基础。

weixin_29279047的博客 100

Android定制组件之图文展示之中国好声音

传送门 ☞ Android兵器谱 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229         今天我们学习如何自定义TextView组件,让它既能显示文本,又能显示图像,达到“图文并茂”的效果。这种情景在新闻、文章、彩信内容中很常见。下面给出该场景的案例: 一、案例技术要点 1.创建attrs.xml文件用于设置自定义组件的属性、类型和样式。

leverli的专栏 1万+

5分钟搞定阿里云千问大模型API申请:手把手教你获取API Key

本文提供了一份高效的阿里云通义千问大模型API Key获取实战指南。通过清晰的步骤,帮助开发者在五分钟内完成从账号准备、精准导航控制台到创建并验证API Key的全过程,并强调了密钥安全管理和基础调用测试的重要性,助力快速集成AI能力。

ol789012345的博客 1346

让你的Android应用与外部元素互动起来

一个Android应用程序通常有几个activities。每个act显示一个用户接口允许用户执行一个指定的任务。用户从一个act到另一个act,你的App必须使用一个Intent对象来定义你App想做些什么事。当你通过一个Intent调用startActivity()方法时,系统会使用Intent来鉴定和启动合适的App组件。一个Intent可以明确的启动一个特定的组件(如一个特定的act实例)或

leverli的专栏 1万+

NX二次开发 计算多个体的最小包围盒

多个体的最小包围盒

weixin_72680115的博客 430

Android 14.0 首次开机默认授予app运行时权限(去掉运行时授权弹窗)

在14.0的系统rom产品定制化开发中,在6.0以后对于权限的申请,都需要动态申请,所以会在系统首次启动后,在app的首次运行时, 会弹出授权窗口,会让用户手动授予app运行时权限,在由于系统产品开发需要要求默认授予app运行时权限,不需要用户默认授予运行时弹窗,所以需要在首次开机默认授予所有app运行时权限

安卓兼职framework和app工程师的博客 2531

Android倚天剑之Notification之动感地带

传送门 ☞ Android兵器谱 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229 传送门 ☞ 系统架构设计 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229 传送门 ☞ GoF23种设计模式 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229         前

leverli的专栏 9935

代谢组数据分析(二十六):LC-MS/MS代谢组学和脂质组学数据的分析流程

本教程概述了LC-MS/MS在代谢组学和脂质组学数据分析中的应用流程。首先介绍了样本的采集、提取和LC-MS/MS分析,随后详细阐述了质谱数据的预处理、峰值识别、特征注释,以及数据标准化和统计分析的重要性。特别强调了使用XCMS和CAMERA进行数据对齐和加合物识别,以及利用MultiABLER和LipidFinder进行数据过滤、插补和标准化处理。此外,还介绍了如何应用EigenMS算法进行数据标准化,以及如何使用Limma包进行差异分析。整个流程旨在提高数据质量,确保分析结果的准确性和可靠性,为后续的生

专注生信领域 1954

Android凝碧剑之CalendarView之万年历

传送门 ☞ Android兵器谱 ☞ http://blog.youkuaiyun.com/leverage_1229 凝碧剑         张召重一挺凝碧剑,纵到陈家洛身前,说道:“你年纪轻轻,居然有这身功夫,你师父是谁?”。。。周绮拿了凝碧剑细看,找了几柄纯钢旧刀剑,一剑削下,应手而断,果然锐利无匹。徐天宏在一旁微笑注视。         今天我们学习如何利用Android平台“凝

leverli的专栏 7896

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Android昆仑镜之Fragment

传送门 ☞ Android兵器谱 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229 传送门 ☞ 系统架构设计 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229 传送门 ☞ GoF23种设计模式 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229 紫衫龙王

leverli的专栏 7554

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

使用严苛模式打破Android4.0以上平台应用中UI主线程的“独断专行”

传送门 ☞ Android兵器谱 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229 传送门 ☞ 系统架构设计 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229 传送门 ☞ GoF23种设计模式 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229         已经有

leverli的专栏 7134

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

Android倚天剑之Notification之城管三千

传送门 ☞ Android兵器谱 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229         如果说足球是和平年代的战争,那么城管呢?伟大的人民曲艺家郭德纲先生曾经这样评价:借我城管三千,我能让世界和平!可见在当今社会中城管的威慑力有多大,尤其是中国的城管,你懂的^_^。本文欲借城管之名来引出Android平台对通知的管理也是十分强大的。话说

leverli的专栏 6194

Android常用布局之LinearLayout之简易计算器

传送门 ☞ Android兵器谱 ☞转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229 一、布局(Layout)         简单的说,Activity就是布满整个窗口或者悬浮于其他窗口上的交互界面。在一个应用程序中通常由多个Activity构成,都会在AndroidManifest.xml中指定一个主的Activity,如下设置:

leverli的专栏 5927

Android倚天剑之Notification之江南style

传送门 ☞ Android兵器谱 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229         上回我们提到在4.0ICS之后,Google为Android平台的Notification这把“倚天剑”注入了更多新鲜的元素,使其更加实用美观。Notification的样式从此变得丰富起来,以适应于不同情景的需要。就像最近非常流行的神曲《江南sty

leverli的专栏 5718

Android应用开发之多选删除之一

传送门 ☞ Android兵器谱 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229         今天我们学习一下如何利用CheckBox实现对联系人记录的多选删除,多选删除功能在平时工作中经常会遇到,通常有两种解决方案:CheckBox实现和ActonBar实现。本人偏爱CheckBox样式的多选模式,因为它实现起来比较灵活多变,样式变换也很容易。

leverli的专栏 5020

Android应用开发之版本更新你莫愁

传送门 ☞ Android兵器谱 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229         今天我们学习如何实现Android应用的自动更新版本功能,这是在各种语言编写的应用中都会经常遇到的情景。当我们的应用检测到网络上有新版本发布时,系统会提示是否下载新版本应用,当新版本应用下载完毕后,系统会自动安装下载的新版本应用(或跳转到相关安装页面询问

leverli的专栏 4904

Android雁翎刀之ImageView之定制头像

传送门 ☞ Android兵器谱 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229 雁翎刀          《飞狐外传》鹰爪雁行门弟子:门中大弟子周铁鹪、二弟子曾铁鸥在江湖上成名已久。程灵素曾听师父说起过,知道他门中这一代的弟子,取名第三字多用“鸟”旁,这时听汪铁鹗一报名,又见他使的是雁翎刀,自然一猜便中。          今天我们

leverli的专栏 4776

Android轩辕剑之ActionBar之一

传送门 ☞ Android兵器谱 ☞ 转载请注明 ☞ http://blog.youkuaiyun.com/leverage_1229         Mashup架构由3个不同的部分组成,它们在逻辑上和物理上都是相互脱离的(可能由网络和组织边界分隔):API/内容提供者、Mashup站点和客户机的Web浏览器。 一、API/内容提供者         它们是正在进行融合的内容的提供者。为了

leverli的专栏 4114

Android 开发入门实践(二):Kotlin 空安全,从可空类型到安全访问

延续 NewsApp 项目中的新闻标题练习,记录 Kotlin 安全调用。

Easyhood的博客 285

Android 模块化收口:能力组合框架、手写 LifecycleOwner 与热修复共存

二十多个模块业务高度相似却各有差异,核心矛盾在于“统一与灵活”的平衡。通过角色接口组合(如IProjectAware、IVoiceAware)实现能力按需注入,新增功能零侵入;用模板方法锁定生命周期流程,确保顺序一致;结合@CallSuper与工厂方法,既约束关键逻辑,又保留子类自由。最终实现:骨架统一、填空自由,管得住业务,又不侵入业务。

mmsx990的博客 397
上一篇: Android鸳鸯刀之DatePicker、TimePicker之明年今日
下一篇: Android应用性能优化整体策略
innovation
博客等级 码龄14年 251粉丝 136原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值