編輯:關於Android編程
先上效果圖:
驗證碼采用PHP返回的imageview來實現,xml如下:
int[] array = new int[]{R.drawable.image1,R.drawable.image2,R.drawable.image3}; boolean isMale; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.registerquick); RadioButton rbMale = (RadioButton) findViewById(R.id.rbrgMale); RadioButton rbfMale = (RadioButton) findViewById(R.id.rbrgFemale); rbMale.setOnClickListener(new OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub isMale = true; } }); rbfMale.setOnClickListener(new OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub isMale = false; } }); final ImageView ivAuthPic = (ImageView)findViewById(R.id.ivAuthPic); Button btnChangeaAuthPic = (Button)findViewById(R.id.btnChangeaAuthPic); btnChangeaAuthPic.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Random d = new Random(); int k = Math.abs(d.nextInt()) % 3; ivAuthPic.setImageResource(array[k]); } }); }
1. Dagger2的開發順序Module -> Component -> Application首先模塊(Module)創建需要提供的類實例, 其次把模塊添
在計算機科學領域,反射是指一類應用,它們能夠自描述和自控制。也就是說,這類應用通過采用某種機制來實現對自己行為的描述(self-representation)和監測(ex
先看效果圖: @Override public void onCreate(Bundle savedInstanceState) { super.onC
本例子包含若干shader文件,在項目assests文件夾下矩陣變換類package test.com.opengles7_4;import android.opengl