资源简介
package com.cogent.QQ;
import android.app.Activity;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;
/**注册验证界面activity*/
public class RegisterConfirmActivity extends Activity implements OnClickListener{
private Button btn_reg_reget,btn_title_left,btn_title_right;
private TextView tv_reg_reget,tv_top_title;
private MyCount mc;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.register_confirm);
initView();
}
private void initView() {
tv_reg_reget = (TextView) findViewById(R.id.tv_reg_reget);
tv_top_title = (TextView) findViewById(R.id.tv_top_title);
tv_top_title.setText("QQ注册");
mc = new MyCount(10000, 1000);
mc.start();
btn_title_left = (Button) findViewById(R.id.btn_title_left);
btn_title_left.setOnClickListener(this);
btn_title_right = (Button) findViewById(R.id.btn_title_right);
btn_title_right.setVisibility(View.GONE);
btn_reg_reget = (Button) findViewById(R.id.btn_reg_reget);
btn_reg_reget.setOnClickListener(this);
}
/**自定义一个继承CountDownTimer的内部类,用于实现计时器的功能*/
class MyCount extends CountDownTimer{
/**
* MyCount的构造方法
* @param millisInFuture 要倒计时的时间
* @param countDownInterval 时间间隔
*/
public MyCount(long millisInFuture, long countDownInterval) {
super(millisInFuture, countDownInterval);
// TODO Auto-generated constructor stub
}
@Override
public void onTick(long millisUntilFinished) {//在进行倒计时的时候执行的操作
long second = millisUntilFinished /1000;
tv_reg_reget.setText(second "秒后可以重新获得验证码");
if(second == 10){
tv_reg_reget.setText(9 "秒后可以重新获得验证码");
}
Log.i("PDA", millisUntilFinished/1000 "");
}
@Override
public void onFinish() {//倒计时结束后要做的事情
// TODO Auto-generated method stub
tv_reg_reget.setVisibility(View.GONE);
btn_reg_reget.setVisibility(View.VISIBLE);
}
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch(v.getId()){
case R.id.btn_reg_reget:
mc.start();
tv_reg_reget.setVisibility(View.VISIBLE);
btn_reg_reget.setVisibility(View.GONE);
break;
case R.id.btn_title_left:
RegisterConfirmActivity.this.finish();
break;
}
}
}
import android.app.Activity;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;
/**注册验证界面activity*/
public class RegisterConfirmActivity extends Activity implements OnClickListener{
private Button btn_reg_reget,btn_title_left,btn_title_right;
private TextView tv_reg_reget,tv_top_title;
private MyCount mc;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.register_confirm);
initView();
}
private void initView() {
tv_reg_reget = (TextView) findViewById(R.id.tv_reg_reget);
tv_top_title = (TextView) findViewById(R.id.tv_top_title);
tv_top_title.setText("QQ注册");
mc = new MyCount(10000, 1000);
mc.start();
btn_title_left = (Button) findViewById(R.id.btn_title_left);
btn_title_left.setOnClickListener(this);
btn_title_right = (Button) findViewById(R.id.btn_title_right);
btn_title_right.setVisibility(View.GONE);
btn_reg_reget = (Button) findViewById(R.id.btn_reg_reget);
btn_reg_reget.setOnClickListener(this);
}
/**自定义一个继承CountDownTimer的内部类,用于实现计时器的功能*/
class MyCount extends CountDownTimer{
/**
* MyCount的构造方法
* @param millisInFuture 要倒计时的时间
* @param countDownInterval 时间间隔
*/
public MyCount(long millisInFuture, long countDownInterval) {
super(millisInFuture, countDownInterval);
// TODO Auto-generated constructor stub
}
@Override
public void onTick(long millisUntilFinished) {//在进行倒计时的时候执行的操作
long second = millisUntilFinished /1000;
tv_reg_reget.setText(second "秒后可以重新获得验证码");
if(second == 10){
tv_reg_reget.setText(9 "秒后可以重新获得验证码");
}
Log.i("PDA", millisUntilFinished/1000 "");
}
@Override
public void onFinish() {//倒计时结束后要做的事情
// TODO Auto-generated method stub
tv_reg_reget.setVisibility(View.GONE);
btn_reg_reget.setVisibility(View.VISIBLE);
}
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch(v.getId()){
case R.id.btn_reg_reget:
mc.start();
tv_reg_reget.setVisibility(View.VISIBLE);
btn_reg_reget.setVisibility(View.GONE);
break;
case R.id.btn_title_left:
RegisterConfirmActivity.this.finish();
break;
}
}
}
代码片段和文件信息
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.cogent.QQ;
public final class R {
public static final class attr {
}
public static final class drawable {
public static final int app_icon=0x7f020000;
public static final int bg_button=0x7f020001;
public static final int bg_button_pressed=0x7f020002;
public static final int card_lable_blue_bg=0x7f020003;
public static final int card_lable_edit_bg=0x7f020004;
public static final int checkbox_bg=0x7f020005;
public static final int checkbox_selected=0x7f020006;
public static final int checkbox_selected_pres
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 364 2012-08-08 15:18 QQDemo\.classpath
文件 842 2012-08-08 15:18 QQDemo\.project
文件 881 2012-08-14 15:24 QQDemo\AndroidManifest.xm
文件 2876 2012-08-14 15:24 QQDemo\bin\classes\com\cogent\QQ\LoginActivity.class
文件 325 2012-08-14 15:24 QQDemo\bin\classes\com\cogent\QQ\R$attr.class
文件 2106 2012-08-14 15:24 QQDemo\bin\classes\com\cogent\QQ\R$drawable.class
文件 1127 2012-08-14 15:24 QQDemo\bin\classes\com\cogent\QQ\R$id.class
文件 513 2012-08-14 15:24 QQDemo\bin\classes\com\cogent\QQ\R$layout.class
文件 412 2012-08-14 15:24 QQDemo\bin\classes\com\cogent\QQ\R$string.class
文件 496 2012-08-14 15:24 QQDemo\bin\classes\com\cogent\QQ\R.class
文件 1322 2012-08-14 15:03 QQDemo\bin\classes\com\cogent\QQ\RegisterActivity$1.class
文件 4394 2012-08-14 15:03 QQDemo\bin\classes\com\cogent\QQ\RegisterActivity.class
文件 1724 2012-08-14 15:08 QQDemo\bin\classes\com\cogent\QQ\RegisterConfirmActivity$MyCount.class
文件 2294 2012-08-14 15:08 QQDemo\bin\classes\com\cogent\QQ\RegisterConfirmActivity.class
文件 1149 2012-08-14 13:57 QQDemo\bin\classes\com\cogent\QQ\WelcomeActivity$1.class
文件 1055 2012-08-14 13:57 QQDemo\bin\classes\com\cogent\QQ\WelcomeActivity.class
文件 1064 2012-08-14 15:11 QQDemo\bin\classes\com\cogent\util\ClassPathResource.class
文件 13076 2012-08-14 15:24 QQDemo\bin\classes.dex
文件 150612 2012-08-14 15:28 QQDemo\bin\QQDemo.apk
文件 4490 2012-08-14 15:24 QQDemo\bin\res\drawable-hdpi\app_icon.png
文件 556 2012-08-14 14:16 QQDemo\bin\res\drawable-hdpi\checkbox_selected.png
文件 570 2012-08-14 14:16 QQDemo\bin\res\drawable-hdpi\checkbox_selected_press.png
文件 471 2012-08-14 14:16 QQDemo\bin\res\drawable-hdpi\checkbox_unselect.png
文件 464 2012-08-14 14:16 QQDemo\bin\res\drawable-hdpi\checkbox_unselect_press.png
文件 324 2012-08-14 14:16 QQDemo\bin\res\drawable-hdpi\dialog_bg.9.png
文件 241 2012-08-14 14:16 QQDemo\bin\res\drawable-hdpi\divider_horizontal_line.png
文件 3966 2012-08-14 14:16 QQDemo\bin\res\drawable-hdpi\ic_launcher.png
文件 143 2012-08-14 14:16 QQDemo\bin\res\drawable-hdpi\login_bg.9.png
文件 768 2012-08-14 14:16 QQDemo\bin\res\drawable-hdpi\login_button_nor.9.png
文件 759 2012-08-14 14:16 QQDemo\bin\res\drawable-hdpi\login_button_press.9.png
............此处省略108个文件信息
相关资源
- android分类标题框架demo(SmartTabLayout)
- Glide加载网络图片
- android 端视频拍摄(带进度条)
- 在手机搭建一个html站点(NanoHTTPD)
- Android 2秒内按两次back键退出应用
- 一个基于RSS的新闻应用
- BadgeView实现在控件上显示小标签
- android 息屏亮屏 (呼吸效果)
- 精仿微信程序android源码
- 《kotlin-for-android-developers-zh》(kotli
- android bluetooth 搜尋距離
- Android应用源码追加的6中图片特效处理
- 完美解决android_gif_drawable_demo
- android 调整屏幕亮度 (无需root)
- android通过ajax上传文件到php服务器
- android 联动滚轮(选择控件)
- cad快速看图 破解版 永久免费
- WordPress大前端主题DUX5.3破解优化版
- PDF数字签名(ITEXT+keytool)
- darkcomet原版(从作者那要来的)
-
android_自定义ti
tleBar - 《Core.Java.Volume.I.Fundamentals.10th.Editio
- 《IBM存储串口命令大全》pdf
- android 异常崩溃后 重启app(进程守护
- QQSlidingMenu(QQ5.0的侧滑菜单特性)
- SwipeRefreshLayoutDemo(下拉刷新)
- TurntableDemo(圆形菜单)
- ViewPagerAnimator(ViewPager动画切换)
- DialogPlusDemo(对话框组件,可做上下弹
- 最完整的伺服培训教程(图文并茂)
评论
共有 条评论