- 博客(29)
- 资源 (11)
- 收藏
- 关注
原创 使用ListView显示信息列表
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" > <I
2016-09-29 20:55:08 350
转载 Spinner样式大全
关于spinner控件有很多特殊的样式甚至是表现的很夸张的样式,这里就仅仅通过更换系统自带的xml样式来试验各种spinner样式效果。首先在工程里创建最简单的spinner:需要更换的地方有两处:一。ArrayAdapter adapter = new ArrayAdapter( this, Android.R.layout.simple_spinner_item);
2016-09-28 18:49:08 433
原创 显示文本框中的输入信息
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView
2016-09-28 18:26:02 474
转载 Android控件之SlidingDrawer(滑动式抽屉)详解与实例
SlidingDrawer效果想必大家也见到过,它就是1.5模拟器上进入应用程序列表的效果。下面是截图 一、简介 SlidingDrawer隐藏屏外的内容,并允许用户通过handle以显示隐藏内容。它可以垂直或水平滑动,它有俩个View组成,其一是可以拖动的handle,其二是隐藏内容的View.它里面的控件必须设置布局,在布局文件中必须指定handle和conte
2016-09-28 16:57:38 702
原创 AutoCompleteTextView
<!-- * Copyright (C) 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a co
2016-09-21 20:52:47 199
转载 控件AutoCompleteTextView 自动提示
在输入框中输入我们想要输入的信息就会出现其他与其相关的提示信息,这种效果在Android中是用AutoCompleteTextView实现的。AutoCompleteTextView android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id
2016-09-21 20:22:10 238
原创 识别浮点常量问题
识别浮点常量问题Time Limit: 1000MS Memory Limit: 65536KBProblem Description编译器在对程序进行编译之前,首先要进行语法分析。通常,程序被分解成若干个小单元,然后和语言的语法模式进行匹配。在分析表达式的时候,变量的类型在变量声明的时候就决定了;而常量的类型需要从常量的形式来判断。假设你是自动编译器(ACM)开发小组
2016-09-21 20:19:02 1541
转载 小C语言--词法分析程序
小C语言--词法分析程序Time Limit: 1000MS Memory Limit: 5000KBProblem Description小C语言文法 1. →(){}2. →||3. →;4. →,|5. →|6. →||||7. →()|()8. →()9. →(;;)10. →{}11. →;12. →=|13.
2016-09-21 17:58:17 11115 2
原创 在屏幕中显示下拉表框
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" >
2016-09-19 20:47:48 223
原创 RadioButton单选按钮
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <RadioGr
2016-09-19 20:30:24 236
原创 CheckBox复选框
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <C
2016-09-19 20:28:28 236
原创 Beautiful Year
Beautiful YearTime Limit: 1000MS Memory Limit: 65536KBProblem Description It seems like the year of 2013 came only yesterday. Do you know a curious fact? The year of 2013 is the first
2016-09-18 10:44:03 883
原创 C 旅行
C 旅行Time Limit: 1000MS Memory Limit: 32768KB Problem DescriptionTom和Alice结婚一段时间了,感情非常好,一天他们相约去旅行,终点在遥远的地方。 地形是非常复杂的,路途是非常曲折的。但我们简化一下是一个矩阵。起点也就是他们家在矩阵的左下角,终点也就是他们要去的遥远的地方在右上角,矩阵行列的交
2016-09-18 10:43:01 316
原创 俄罗斯方块
俄罗斯方块Time Limit: 1000MS Memory Limit: 32768KB Problem Description这个游戏大家太熟悉了,应该没有人没玩过吧,相当有创意的一个小游戏,成为了人们心中的经典。玩这个游戏时,我们最关注的是下面已经垒起的部分,正在下降的图形,以及下一个要出现的图形,目标是想方设法将一行或几行填满,从而可以消掉,避免垒的太高而导致游
2016-09-18 10:41:49 320
原创 俄罗斯方块
俄罗斯方块Time Limit: 1000MS Memory Limit: 10000KB Problem Description这个游戏大家太熟悉了,应该没有人没玩过吧,相当有创意的一个小游戏,成为了人们心中的经典。玩这个游戏时,很关键的是正在的下落的那个图形,位置和角度,因为可以通过旋转它来调整到适当的位置,从而能够消掉更多下面的块。 今天我
2016-09-18 10:36:27 274
原创 HttpUrlConnection
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_p
2016-09-18 10:32:32 281
原创 使用GestrueDetector进行手势识别
手势交互过程原理:1、手触屏的一刹那触发MotionEvent事件。2、被OnTouchListener监听,在onTouch中获得MotionEvent对象。3、GestrueDetector转发MotionEvent对象至OnGestureListener。4、OnGestureListener获得该对象,根据该对象封装的信息做出合适的反馈。MotionEvent:1、
2016-09-12 18:02:29 969
原创 Android中常用的系统服务
package com.example.systemservicedemo;import android.app.Activity;import android.app.ActivityManager;import android.content.Context;import android.media.AudioManager;import android.net.Connectiv
2016-09-11 19:14:45 338
原创 布局填充的另一种方法
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LayoutInflater inflater =(LayoutInflater) MainActivity.this.getSystemService(LAYOUT_INFLATER_SE
2016-09-11 09:44:10 266
原创 Service
Start方式的特点:服务跟启动源没有任何联系无法的带服务对象Bind方式的特点:通过Ibinder接口实例,返回一个ServiceConnection对象给启动源通过ServiceConnection对象的相关方法可以得到Service对象package com.example.servicedemo;import com.example.servicedemo.My
2016-09-10 22:02:03 265
原创 四大组件之BroadcastReceiver
组件篇BroadcastReceiver:普通广播的特点:同级别接收是随机的(无序的)级别低的后收到广播接收器不能截断广播的继续传播也不能处理广播同级别动态注册高于静态注册package com.example.broadcastrecieverdemo;import android.app.Activity;import android.content.Intent
2016-09-09 17:37:51 169
原创 查询Email与增加联系人
package com.example.contentproviderdemo2;import android.app.Activity;import android.content.ContentProvider;import android.content.ContentResolver;import android.content.ContentUris;import andro
2016-09-08 21:05:48 504
原创 ContentProvider之手机号码查询
package com.example.contentproviderdemo;import android.R.integer;import android.app.Activity;import android.content.ContentResolver;import android.database.Cursor;import android.os.Bundle;impor
2016-09-08 20:22:34 233
原创 在Android中对文件的读写操作
package com.example.filedemo2;import java.io.ByteArrayOutputStream;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;
2016-09-06 21:09:19 2539
原创 在Android中创建文件
package com.example.filedemo1;import java.io.File;import java.io.IOException;import android.app.Activity;import android.os.Bundle;import android.view.Menu;import android.view.MenuItem;import...
2016-09-05 20:37:31 14229
原创 SQLiteOpenHelper
package com.example.sqlitedemo3;import android.app.Activity;import android.database.Cursor;import android.database.sqlite.SQLiteDatabase;import android.os.Bundle;import android.util.Log;import
2016-09-04 22:05:46 329
原创 使用内置函数操作数据库
package com.example.sqlitedemo2;import android.app.Activity;import android.content.ContentValues;import android.database.Cursor;import android.database.sqlite.SQLiteDatabase;import android.os.Bu
2016-09-04 21:32:54 363
原创 编写SQL语句操作数据库
代码:package com.example.sqlitedemo;import android.app.Activity;import android.database.Cursor;import android.database.sqlite.SQLiteDatabase;import android.os.Bundle;import android.util.Log;imp
2016-09-04 20:31:15 322
原创 存取用户名实例
xml文件:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height=
2016-09-04 17:16:44 275
android(登录、xml解释、适配器)
2017-12-07
图书出租系统
2017-11-27
图书租赁管理系统
2017-01-06
ImageSwitcher实现图片左右切换
2016-09-22
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人