[android-developers] ListActivity, Cursor, and CursorAdapter

2011-04-07 Thread android.xi...@gmail.com
In my game, a table is created with 3 columns, _id, player_name, score. It is easy to get the name and score, order by score desc, then get anther value rank. If I want to display the rank number in the list activity (which is not in the cursor, but the sequence of the records), is it possible

[android-developers] How to pass configuration parameters to custom views during construction

2011-04-05 Thread android.xi...@gmail.com
Hello Guys, I defined a customer view, e.g. MyView, which need to be constructed with some own parameter, e.g. line number in the view, an integer. The view will be employed by my activity, MyActivity. It seems that the View's constructors are fixed and will be called by the system, and I can do

[android-developers] How can I draw nice connections between two points in Android?

2011-03-29 Thread android.xi...@gmail.com
For simplification, there are two points in the Canvas, p1 (x1, y1) and p2(x2, y2). I want to connect the two points with some kind of connections, which is not the drawLine function. In the connection, there are much nice effects (much beautiful) than only a simple line, for example, the