Strategies for Landing an Oracle DBA Job as a Fresher
Android query
1. Android Query
Makes Android coding
simpler, easier, and more fun!
Michal CoPLaS Pavlasek
www.pavlasek.sk/devel/
twitter.com/pavlasek
2. About me
Java, Android, Grails (etc...) developer
I'm not creator of Android Query :)
Just fan of it
3. Android Query
Light-weight library for doing asynchronous tasks
and manipulating UI elements in Android
http://code.google.com/p/android-query/
Inspired by jQuery, a javascript framework for web site,
hence the name "Query".
4. Android Query
Things I really like:
Less Code
Chaining
AJAX Callback
Image Loading
In-app Version Check
Multiple UI, One Piece of Code
6. Less Code - After
public void renderContent(Content content, View view) {
AQuery aq = new AQuery(view);
aq.id(R.id.icon).image(R.drawable.icon).visible().clicked(this,
"someMethod");
aq.id(R.id.name).text(content.getPname());
aq.id(R.id.time).text(FormatUtility.relativeTime(
System.currentTimeMillis(),
content.getCreate())).visible();
aq.id(R.id.desc).text(content.getDesc()).visible();
}
7. Chaining
All "set" methods in AQuery returns itself.
String name = "My name in black text, red
background, visible, and invoke nameClicked
when clicked";
aq.id(R.id.name).text(name).background(
R.color.red).textColor(R.color.black).enabled(true)
.visible().clicked(this, "nameClicked");
8. AJAX Callback - JSON Example
public void asyncJson(){
//perform a Google search in just a few lines of code
String url = "http://www.google.com/uds/GnewsSearch?
q=Obama&v=1.0";
aq.ajax(url, JSONObject.class, this, "jsonCallback");
}
public void jsonCallback(String url, JSONObject json,
AjaxStatus status){
if(json != null){
//successful ajax call
}else{
//ajax error
}
}
11. In-app Version Check
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MarketService ms = new MarketService(this);
ms.level(MarketService.MINOR).checkVersion();
}
See more: http://code.google.com/p/android-query/wiki/Service
12. Multiple UI, One Piece of Code
public void renderContent(Content content, View view) {
//this is a phone!
//this view exists
aq.id(R.id.textInMobileLayoutOnly).text(
"Welcome to my Mobile App!");
//this button exist in tablet layout only, but it's ok
//AQuery will ignore all the operations on this view
aq.id(R.id.butttonInTabletOnly).text("Open a new tab!");
}
13. And many more...
Binding
XML Parsing
Authentication
Alleviate Fragmentation
Extendable
Light Weight
Non-intrusive
Open Source
14. More info
http://code.google.com/p/android-query/
http://twitter.com/AndroidQuery
http://groups.google.com/group/android-query