Skip to content
Advertisement

Tag: android

Print array without brackets and commas

I’m porting a Hangman game to Android and have met a few problems. The original Java program used the console, so now I have to somehow beautify the output so that it fits my Android layout. How do I print an array without the brackets and commas? The array contains slashes and gets replaced one-by-one when the correct letter is

Android Resource – Array of Arrays

I am trying to implement a resource data structure that includes an array of arrays, specifically strings. The issue I run into is how to get the sub-array objects and their specific values. Here is what my resource file looks like…. Then, in my Java code I retrieve the array and try to access the sub elements like so… At

How to start Activity in adapter?

I have a ListActivity with my customized adapter and inside each of the view, it may have some buttons, in which I need to implement OnClickListener. I need to implement the OnClickListener in the adapter. However, I don’t know how to call the function like startActivity() or setResult(). Since the adapter doesn’t extend to Activity. So what is the best

Advertisement