`
文章列表

WebView 网络视图

public class Main extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); WebView webView = (WebView) findViewById(R.id.webview); /* 打开网页 */ ...
  package com.lilin.browser; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.Window; import android.view.View.OnClickListener; import android.webkit.WebChromeClient; import android.webkit.WebView; import android.webkit.WebViewClient; ...
1.    添加jar包   2.    配置AndroidManifest.xml文件 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.youmi.android.sdk.sample" android:versionName=
public class MainActivity extends Activity { private static final int ITEM1 = Menu.FIRST; private static final int ITEM2 = Menu.FIRST+1; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } publ ...
  <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" ...

Activity间的传值

String name = myEditText.getText().toString(); Bundle data = new Bundle();//实例化Bundle对象 data.putString("name", name);//将姓名信息添加到Bundle对象中 Intent intent = new Intent(MainActivity.this,ResultActivity.class); intent.putExtras(data); startActivity(intent);   获取传递过来的值: ...
 安装进内存: go桌面 365日历 QQMusic 豆瓣FM 正点工具箱   ====== 安卓市场   UC浏览器 资费通 sim卡管理 随手记   QQ通讯录 QQ输入法 QQ阅读 QQ 快图浏览 随手记 微信 google地图 办公套件   文件浏览器ES RE管理器 360宝盒 发声计算器 人人电台 人人客户端     读者2011 Zcom杂志 Viva阅读         泡泡龙 愤怒的小鸟    
启动另一个Activity,并返回一个结果。 使用startActivityForResult()       点击上一步的时候,保存下一步页面输入的用户信息 MainActivity.java   package com.amaker.test; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; impor ...

子菜单

    博客分类:
  • Menu
    public class MainActivity extends Activity { private static final int ITEM1 = Menu.FIRST; private static final int ITEM2 = Menu.FIRST+1; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } ...
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Abso ...

系统自带的TabWidget

 
public class MainActivity extends TabActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); /* * requestWindowFeature(Window.FEATURE_NO_TITLE); * getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, * WindowManage ...
  package com.amaker.test; import java.util.ArrayList; import java.util.List; import android.app.TabActivity; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TabHost; public class MainActivit ...

进度条大全

1.对话框进度条   public class MainActivity extends Activity { private Button myBtn; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); myBtn = (Button)findViewById(R.id.Button01); ...
public class MainActivity extends Activity implements OnClickListener { private Button b1, b2; private ImageView imageView; private AnimationDrawable danceAnimation; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layo ...
/** * Tween 动画 * * @author lilin * @date 2011-9-5 下午04:03:40 * @ClassName: Main * @Description: 通过XML布局的方式 */ public class MainActivity extends Activity implements OnClickListener { private Button b1, b2, b3, b4; private ImageView imageView; @Override public void onCreate(Bu ...
Global site tag (gtag.js) - Google Analytics