編輯:關於android開發
public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final TextView txt=(TextView)findViewById(R.id.showTime); final Handler myHandler=new Handler() { @Override public void handleMessage(Message msg) { if(msg.what==0x12) { txt.setText("當前時間:"+new java.util.Date()); } } }; Button btn=(Button)findViewById(R.id.btn); btn.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { // TODO Auto-generated method stub new Timer().schedule(new TimerTask() { @Override public void run() { // TODO Auto-generated method stub myHandler.sendEmptyMessage(0x12); } }, 0,1000); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } }
Android中使用開源框架android-image-indicator實現圖片輪播部署,之前的博文中有介紹關於圖片輪播的實現方式,分別為(含超鏈接): 1、《Andr
Android Studio 打包簽名發布New Key Store,androidstore Key store path:存放路徑 Key Alias
詳細Android Studio + NDK范例 【本范例所采用的配置】 ·系統:Windows7旗艦版,Service Pack 1,32位(最新的NDK已不支
谷歌官方SwipeRefreshLayout下拉刷新的用法。,swiperefreshlayout《Android SwipeRefreshLayout:谷歌官方SDK包