自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

原创 关于使用冒泡法

关于使用冒泡法public class Main { public static void main(String args[]) { int score[] = { 89, -23, 64, 91, 119, 52, 73 }; Main m = new Main(); m.printScore(score); } public

2016-02-29 20:08:56 776

原创 BroadcastReceiver的简单使用

BroadcastReceiver 是android4大组件之一,它的使用是非常重要的。最常用的是普通广播和有序广播。 广播的机制是:发送广播->接收广播。//activity_main.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schema

2015-08-10 17:42:52 447

原创 利用系统ContentProvider增加联系人

<uses-permission android:name="android.permission.READ_CONTACTS"/> <uses-permission android:name="android.permission.WRITE_CONTACTS"/>

2015-08-10 14:29:54 630 1

原创 使用系统自带的ContentProvider查询联系人

//MainActivity.javapackage com.example.test_contentproviderdemo;import android.os.Bundle;import android.provider.ContactsContract;import android.provider.ContactsContract.CommonDataKinds.Phone;impor

2015-08-10 13:49:45 705

原创 为什么在AndroidManifest.xml中Activity的theme用不了Theme.Light.NoTitleBar?

代码如下:<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.test_submenu" android:versionCode="1" android:versionNa

2015-08-05 00:37:46 2227

原创 Android开发之创建ContextMenu上下文菜单

照旧,先上码。 //activity_main.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" androi

2015-08-03 20:40:51 707

原创 Android创建菜单Menu

不多说,先上码。//activity_main.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android

2015-08-03 18:48:20 748

原创 使用Notification实现状态通知栏的发送和取消

//activity_main.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_

2015-08-03 11:42:51 630

原创 如何对自定义的Dialog的View中控件进行监听

//activity_main.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_

2015-08-03 00:18:49 682

原创 switch(String s)是在jdk1.7之后才出现,但是编译器又要求使用较低版本。

switch (op) { case "+": result=d1+d2; break; case "-": result=d1-d2; break; case "×": result=d1*d2; break

2015-07-24 14:44:43 2969 2

原创 修改分隔符之后不能正常使用hasNextInt()函数

import java.util.Scanner;public class ScanDemo { //不能判别输入的是否为整数或者小数 public static void main(String[] args) { // TODO Auto-generated method stub Scanner scan=new Scanner

2015-07-21 10:08:58 895 1

原创 TextView如何在超出来的字数后用省略号显示?

这里是在xml文件中操作的1,单行显示的,限制字数的。<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxEms="20" android:ellipsize="end" android:singleLine="true"

2015-09-27 22:43:56 4021

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除