I'm trying to create a button array, where the number of buttons depends on the length of a char array.
This is my code:
int k = 0;
Button[] btnarray = new Button[new_word_array.length];
while (k<new_word_array.length){
k++;
btnarray[k] = new Button(this)...
I'm trying to pass data with my intent. I wan to pass a topscore number (int) from one activity to another.
I'm pretty sure I did it:
Intent keepscore = new Intent(this, Finished.class);
keepscore.putExtra("SomeIntData", tally);
startActivity(keepscore);
The Finished activity loads...
I want to make a 5 frame animation. I got five PNGs, named frame1,frame2,... and put them into the res folder.
I then created Bitmaps, and converted the Bitmaps into BitmapDrawables.
And then added them to an AnimationDrawable inside an ImageView (ImV).
Here is the code.
Unfortunately...
Hi this is a silly problem that I'm a little embarrassed about...
I built my app. It's almost ready for deployment, I'm just changing a few things and cleaning up. But I realized my min SDK version is 6. It's not a problem per se, but my target machine is an Xperia that uses android 1.5, which...
I'm trying to opena database and perform searches of it. It's a prebuilt SQLite DB which I put into assets directory and used the SQLiteOpenHelper class to open it up.
Now I want to perform querys but I keep getting No Such Table errors, and after trying any number of permutations of searches...
I am developing a very simple quiz app. It's just a standard multiple choice quiz. I am not sure how many questions there will be, but it could go into the hundreds.
So far I only put in about a dozen questions. All of them are in a string array. However, I'm worried that if I decide to vastly...
Hi. I have a question about how to get the XML string array items into a Java string[] array.
This is what I have:
private String[] rbarray;
private Random random;
...
...
...
rbarray =res.getStringArray(R.array.Questions);
randint = random.nextInt(2);//so far I only have two items in the...
I'm looking for a way to convert a string to a charsequence.
My code is:
public void randText(int r){
r++; //necessary increment
String rs = Integer.toString(r); //random string
String qs ="R.string.q"+rs;//question string.
CharSequence cs = qs.subSequence(0, 12)...
Hi. I'm new to Android. I started writing apps last week. I have a little background in VB and Python with some Java a long time ago, but I'm getting confused with some Java syntax. I don't remember seeing this before (I have used swing/AWT to make applets, a long time ago so my memory is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.