: Ctrl + Shift + o
Ctrl+F
Ctrl+Shift+K
Ctrl+K
IDE eclipse .jar
(Ctrl+shift+ h)
eclipse,
eclipse
run -> External Tools -> External Tools Configurations...
location: C:\WINDOWS\explorer.exe
Arguments: ${container_loc}
Alt+Shift+
Ctrl1+1
Alt+/
Java F2
Java Alt+Shift+
Java Alt+Shift+
Java Alt+Shift+
Ctrl+J
Ctrl+Shift+J Ctrl+-
Ctrl+=
Ctrl+Shift+T
Ctrl+Shift+R
Alt+
Alt+
Ctrl+,
Ctrl+.
Java Ctrl+O
Ctrl+Shift+H
Ctrl+Shift+P
Ctrl+Q
Java Ctrl+Shift+
Java Ctrl+Shift+
Ctrl+L
Ctrl+Shift+U
Ctrl+H
Ctrl+G
Ctrl+Shift+G
Ctrl+
Ctrl+
Ctrl+X
Ctrl+S
Ctrl+P
Ctrl+F4
Ctrl+Shift+S
Ctrl+Shift+F4
Alt+Enter
Ctrl+N
Ctrl+B
Java Ctrl+Shift+F
Java Ctrl+\
Java Ctrl+/
Java Ctrl+Shift+M
Java Ctrl+Shift+O
Java try/catch ,
Ctrl+1
F7
F6
F5
Ctrl+F5
F11
F8
Shift+F5
/ Ctrl+Shift+B
Ctrl+D
Ctrl+F11
Ctrl+R
Ctrl+U
Alt+Shift+Z
Alt+Shift+M
Alt+Shift+L
Alt+Shift+I
Alt+Shift+V
Alt+Shift+R
Alt+Shift+Y
I
1.Ctrl + Shift + F :
2.Ctrl + 1 :
3.Alt + ? :a
4.Alt + Shift + s source,override & implement
5.Alt + / :
return new AlertDialog.Builder(this)
.setTitle("Chooose List")
.setIcon(R.drawable.icon)
.setView(view)
.setAdapter(new CityListAdapter(this, lstCountryInfo),
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Log.i(TAG, "id:" + which);
setEditText(lstCountryInfo.get(which));
}
})
.create();
/***************** Method:**************************/
getParent() to find the parent widget or container
findViewById() to find a child widget with a certain ID
getRootView() to get the root of the tree (e.g., what you provided to the activity via setContentView())
SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, 0);
//_Activity
Intent intent = new Intent();
intent.setClass(RadioButtonDemo.this, ListActivityDemo.class);
startActivity( intent );
startActivityForResult(intent, 10);
setResult( 1000 );
finish();
/***************** ArrayAdapter:**************************/
new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, items);
/***************** CursorAdapter , SimpleAdapter,ActivityAdapter , ActivityIconAdapter:**************************/
setListAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1,
items));
/***************** :**************************/
import android.app.Activity;
import android.os.Bundle;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
public class RadioButtonDemo extends Activity{
private TextView tv;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
tv = (TextView) findViewById(R.id.msg);
((RadioGroup) findViewById(R.id.radioGroup1))
.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
public void onCheckedChanged(RadioGroup group, int checkedId) {
RadioButton rb = (RadioButton) findViewById(checkedId);
tv.setText("You choosed " + rb.getText());
}
});
}
}
/***************** :**************************/
public class RadioButtonDemo extends Activity implements RadioGroup.OnCheckedChangeListener {
private TextView tv ;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
tv = (TextView)findViewById(R.id.msg );
RadioGroup rg = (RadioGroup)findViewById(R.id.radioGroup1 );
rg.setOnCheckedChangeListener(this);
}
public void onCheckedChanged(RadioGroup group, int checkedId) {
RadioButton rb = (RadioButton)findViewById(checkedId);
tv.setText("You choosed " + rb.getText() );
}
}
/***************** :**************************/
mKillButton.setOnClickListener(mKillListener);
private OnClickListener mBindListener = new OnClickListener() {
public void onClick(View v) {
// Establish a couple connections with the service, binding
// by interface names. This allows other applications to be
// installed that replace the remote service by implementing
// the same interface.
bindService(new Intent(IRemoteService.class.getName()),
mConnection, Context.BIND_AUTO_CREATE);
bindService(new Intent(ISecondary.class.getName()),
mSecondaryConnection, Context.BIND_AUTO_CREATE);
mIsBound = true;
mCallbackText.setText("Binding.");
}
};
/***************** + :**************************/
btn.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
TimerTask task=new TimerTask() {
public void run() {
notifyMe();
}
};
timer.schedule(task, 5000);
}
});
/***************** Loge:**************************/
Log.v() (verbose)
Log.d() (debug)
Log.i() (information)
Log.w() (warning)
Log.e() (error)
/***************** AndroidMWjO:**************************/
M
Settings --> Wireless Controls --> Mobile networks --> Access Point Names
Mc[MENU] oc[New APN]
Mc[APN][ CMNET ]cOK[MCC],c[MNC](e310,260)tfO_BWj
/****************** TelephonyManager SIM*********************************/
//SIMISO
private String getSimCountryIso(){
TelephonyManager telManager = (TelephonyManager)getSystemService(this.TELEPHONY_SERVICE);
return "Country:" + telManager.getSimCountryIso() + "\r\nSimSerialNumber:" + telManager.getSimSerialNumber() ;
}
//SIM
/*
* # TelephonyManager telManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
# telManager.getSimSerialNumber();
AndroidManifest.xml
1. <uses-permission android:name="android.permission.READ_PHONE_STATE" />
*/
/***********************auto run ******************************/
class:
public class AutoRunService extends BroadcastReceiver {
/**
* @param context Context
* @param intent Intent
*/
public void onReceive(Context context, Intent intent) {
context.startService(new Intent(context, LocalService.class));
}
}
manifest.xml:
<!-- servie auto start -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"></uses-permission>
<receiver android:name=".AutoRunService">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
Dialog}:
requestWindowFeature(Window.FEATURE_NO_TITLE);
Window w = getWindow();
w.setBackgroundDrawableResource(R.drawable.content_background);
Q: Application does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-library android.test.runner
A:
Android Application does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-library android.test.runnerRun AsAndroid JUnit TestRun DialogJUnit Test
Q:Unparsed aapt error
A:EclipseAndroid res/Unparsed aapt error(s)! Check the console for output"
res/layoutxml: NewScreen.xml, ,
the layout file name can only contain characters in [a- z0-9] etc.
layout 260~9. ,.
, R.java. , res(), R.java.
xmlR.java!
[2010-03-29 10:02:47 - Sudoku] W/ResourceType( 3540): Bad XML block: header size 62 or total size 26129448 is larger than data size 0
[2010-03-29 10:02:47 - Sudoku] E:workspaceSudoku esmenumenu.xml:2: ERROR Error parsing XML: no element found
[2010-03-29 10:04:55 - Sudoku] W/ResourceType( 4892): Bad XML block: header size 62 or total size 0 is larger than data size 0
Project--------->clean..
id 博主 = [[KILONET.CNBLOGS.COM alloc] initWithValue:@"天堂向右,我依然向左"
网名:@"老舟"
兴趣:@"影音,阅读"
动态:@"系统架构设计,Android通信模块开发"
网址:@"http://kilonet.cnblogs.com"
签名:@"--------------------------------------------------
Stay Hungry , Stay Foolish
求 知 若 渴,处 事 若 愚
--------------------------------------------------"
]; // Never Release