http://stackoverflow.com/questions/4375375/how-to-resolve-waiting-for-debugger-message
Android
Eclipse build path – How to add a new jar file to your Eclipse build path
幾個開發Android應用程式常遇到的錯誤與解法
Anrdoid+CustomCusorAdapter+ListFragment
AsyncImageView
MWPhotoBrowser
[Android] Sherlock actionbar & indeterminate progress bar
Here is how you add this kind of indeterminate ProgressBar with a
ActionBarSherlock
object : (actually it’s easier the other one but the progressBar is shown alone and not above aMenuItem
)1 – Put this line in the onCreate() method before the setContentView() call :
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
-> This line specify that you will use the indeterminate ProgressBar function.
2 – Enable the indeterminate ProgressBar by calling :
setSupportProgressBarIndeterminateVisibility(true);
3 – Disable the indeterminate ProgressBar by calling :
setSupportProgressBarIndeterminateVisibility(false);
Remark : Have a look in the sample folder of the ActionBarSherlock folder. I found this code in the following file : JakeWharton-ActionBarSherlock-9598f2b\samples\demos\src\com\actionbarsherlock\sample\demos\IndeterminateProgress.java
Sherlock Actionbar invalidateOptionsMenu()
Sometimes I would like “redraw" the action bar in run time, then invalidateOptionMenu() is called
http://stackoverflow.com/questions/14898940/sherlock-actionbar-invalidateoptionsmenu
[Android] volley library with Basic Authentication
I found HttpHeaders and HttpAuthentication Class from
Spring for Android(http://matthias.jimdo.com/2011/07/04/consuming-restful-web-services-on-android-using-spring-android/)
then I follow this ….
http://stackoverflow.com/questions/16817980/how-does-one-use-basic-authentication-with-this-library
to extend the JsonObjectRequest from volley like this…
public class feedJsonObjectRequest extends JsonObjectRequest {
public feedJsonObjectRequest(int method, String url,
JSONObject jsonRequest, Listener<JSONObject> listener,
ErrorListener errorListener) {
super(method, url, jsonRequest, listener, errorListener);
// TODO Auto-generated constructor stub
}
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
// TODO Auto-generated method stub
HttpHeaders requestHeaders = new HttpHeaders();
HttpAuthentication auth = new HttpBasicAuthentication(“username", “password");
requestHeaders.setAuthorization(auth);
return requestHeaders.toSingleValueMap();
}
}
then your can use it just like the normal jsonObjectRequest()….
feedJsonObjectRequest jsObjRequest = new feedJsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {})
[Android] adb is down (Mac OSX)
if you are using terminal input : adb start-server….
* daemon not running. starting it now on port 5037 *
cannot bind ‘tcp:5037’
ADB server didn’t ACK
Yes, because port:5037 is occupied by other process
Let’s see who are using it…
lsof -i | grep LISTEN
Close the eclipse FIRST!
last time I had a “zombile" adb is occupied, then kill it: killall adb
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
and you can see the devices that are connected by….
adb devices
Similar post…
http://www.dotblogs.com.tw/jgame2012/archive/2012/04/06/71311.aspx