I've got a gallery (images) in a RelativeLayout and if the users click on it, three Buttons and a TextView appears. I made it with the visible-property, that means the three Buttons and the TextView are declared as invisible in the xml-file and later the onClick() of the Gallery makes it visible with setVisibility(0).That works fine, but...
my goal:
create an image gallery with each image having a description, name, title, other possible misc info. as the user navigates through the gallery, image info will be displayed. i plan to store the data in an arraylist of maps ArrayList<Map<String, String>> which is filled from the database. the list will include resource ID value...
Based on a suggestion in a previous question I asked on here, I'm trying to push my socket connection for an application that I've written into a service. I spent the better part of the day yesterday researching services and actually mocked up a few (one remote, one local).
My question is in two parts:
1) after having played with both...
Hi,
I am using several listview's in my application that receive many notifications each second on a thread. when this happens i update data in the array adapter and then call notifiyDataSetChanged() on the UI thread.
However this causes getView to be called on the adapter on all the visible postions.
this is causes various issues for m...
I have a ListActivity containing an object I've defined called a MessageItem. I want to pass the data in this MessageItem off to a Service to do some stuff, but I don't want the Activity to be data bound to the Service such that Android can't reclaim the Activity if it needs to (ergo memory leak).
What I'm doing is passing the MessageI...
Hi Firends,
I have a singleton in an activity. When I end my application (like pressing back button), and start it again after some time, the singleton is not recreated, but is holding previous state. Singleton is not destroyed if the application is destroyed? Do I have to null its static members in onDestroy() to avoid memory leak? Tha...
Hi All,
I need to size the top-most layout of my application dynamically (programmatically) based on information loaded from a configuration file.
Right now the in main.xml I have
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/LinearLayout01"
android:layout_width="fill_parent" ...
I want to check my program code for time consuming operations. I thought DDMS is the best tool to achieve that.
However, I cant see Threads, Heaps and so on. It tells my to select a client. But I dont know where other than the Devices Tab, which doesnt take effect.
What do I have to do? Is there maybe smth wrong with my ADB setup (But ...
Hello, i been having problem...
first of this is for android.
I have created a Serializable ArrayList<E> class that extends ArrayList<E> and implements Serializable. This class works flawlessly when saving and loading ArrayList<String>.
Now i am trying to save and reload a SerializableArrayList<Overlay>.
at first i couldn't save the ...
Let's say I have a ListView of items:
Cat
Dog
Mouse
And these are bound to the ListView via an adapter to a database.
What I want to be able to do is to be able to re-order the list view,. For example I want to somehow drag "Mouse" up to the top of the list above "Cat". Once I have an order set, I then want to "save" the list and i...
Hi,
Anybody can explain me how to serialize easly a class/object and save it under a name or tag for restoring later ?
thanks to give code examples if possible.
...
Let's say I have an android app, and in that app I want to animate a graphic of a ball in an "L" shape. This would require me to define a Tween Animation where I create an animation xml file (written below) and apply it to a View which has the ball graphic in it.
<translate>
Ydelta = 20;
offset = 0;
duration = 100;
</translate>
<trans...
I like the layout of the toast widget very much, that means rounded corners, transparency, light grey border. Is there any way to see the layout parameters of such android standard widgets like the toast?
I would like do define a TextView with the same layout parameters.
...
Hello all,
is it possible to start a context menu on the onCreate method? I know its probably bad design ethics but I have my resons!! I've tried the:
registerForContextMenu(this.getCurrentFocus());
But its not working.. So does anyone have any better ideas?
Many thanks in advance!
@Override
public void onCreate(Bundle savedIns...
Can I get a View's x/y position (relative to the root layout of my Activity) in Android?
...
Hi,
Is there a way to style a RadioButton as a flat button? I have four options:
| btn1 | btn2 | btn3 | btn4 |
instead of having the little radio circle next to each, I'd like to show each as just a plain flat button. Is that possible without having to draw them myself?
Thanks
...
I want to use the Geocoder in an android application, I've got the following piece of code to sample it :
public class LocatorGeo extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView...
I have a ViewFlipper that presents 3 different views.
Is it possible to have 3 classes manage* the 3 different views? If so, how do I go about doing this?
For example, if View 1 shows a List of News and View 2 Shows a List of Prices, I want to have a News class that handles the interaction of the listview in News, and a Prices class t...
is it possible to change the layout of the app when the orientation of the screen changes from portrait to landscape ?
I mean linking the app to two different .xml layout files for each landscape and portrait?
or maybe is it possible to change placement of 2 views ?
like...
i want a button to be below the textview in portrait mode but i ...
I have an android app that uses a background service for uploading data.
When we go upload data, everything works fine. Even when we make the display sleep, everything works.
However, this was while we were connected to Eclipse via USB. Once we disconnected the device, started to send the data and made the screen 'sleep,' we got a so...