I use an BaseAdapter to display a list of objects. This objects are fetched from a server. The getView() method of the BaseAdapter is the following:
/* (non-Javadoc)
* @see android.widget.Adapter#getView(int, android.view.View, android.view.ViewGroup)
*/
@Override
public View getView(int position, View ...
I am trying to remove an ImageButton's background in only the default state. I'd like the pressed and selected states to behave as usual so that they look correct on different devices, which use different colors for the pressed and selected states.
Is there any way to set an ImageButton's background default state's drawable without affe...
Hi,
i've noticed that the default look of tabs has changed between Android versions (see screenshot). I like the first version better, but i need to set my android target to version 8 (android 2.2) so that app2sd works. but then i have the darker backgrounds. how can i switch to the old one? setting the background color manually produce...
I have a quite problematic UI layout to implement, and I'm not sure if it's even possible using standard UI widgets. It looks something like this:
Picture 1
The green, lined thing is supposed to be a ListView, and the red rectangle is another View. This red View should be scrolled with the ListView, as if it's part of it. Some list-ele...
Hi,
I'm trying to use Mozilla Rhino in my Java application for Android to evaluate some JavaScript. I am using Eclipse + ADT plugin.
First I tried simply downloading the Rhino .jar file from Mozilla's website and adding it to the project as a library in Eclipse. Eclipse recognised it fine and compiled the application. However, when run...
I am writing an app which needs to periodically check the server for new messages and notify the user. I have seen some examples using AlarmManager to hit a BroadcastReciever which seems like the right thing to do, but i cant seem to get it to work.
Can anyone show me a step by step tutorial for this sort of thing (repeating alarm which...
My WebView doesn't fill the entire width of my phone. I am telling to fill_parent. Not sure why?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizonta...
I was using some of the code from DeskClock and found that when I tried to modify the CursorAdapter that newView was getting called for each item. (I actually wanted to add a divider and it seems like adding the dividers separately is better than adding them into a single listView)
If I have 3 items I get the following behavior:
new...
The Problem:
I have a local database (sqlite in this case) with each record representing an object instance of a particular class. For this example lets say I have a class called Product. In this case this is in the Android environment but I'm curious about standard Java as well.
When an application or activity starts I read all the da...
In relation with this question.
I am developing a mobile app (Android & iPhone) and I want users to be able to talk to each other. I learn from the question mentioned above that I can't use anonymous users and I need another server to handle that.
I would actually want the users to register a jabber id based on UDID of the device for t...
(sensorManager is a SensorManager)
I'm trying to implement an orientation listener for my program. I declare the listener as a SensorEventListener. The API says I need to pass registerListener a SensorEventListener, Sensor, rate, and handler. What is the handler for?
Also, when I mouse over the error, it insists I use the deprecated ver...
My Android app uses a web service that can only be accessed from the office network. I would like to debug at home.
I can VPN into my office network with ssh on a MAC or putty in windows. Will the Android emulator "automatically" access the office network under VPN or do it requires a specific set-up?
...
Hello.
I want to create a own View which containst two buttons without useing xml.
I tried this:
public class ZoomPlate extends LinearLayout{
private Context context;
private Button plus;
private Button minus;
public ZoomPlate(Context context) {
super(context);
init(context);
}
public Zoo...
hi. here is the problem: i have searched for an answer for this and so far i made it work for the custom camera app that comes with htc phones.
i have the folowing
protected void onActivityResult(int requestCode, int resultCode, Intent data){
if (requestCode == REQUEST_FROM_CAMERA && resultCode == RESULT_OK) {
...
Hello,
I am attempting to orbit an object around a center point, much like the sun and our planets. However I am having no luck at all. Any help would be really great. Thanks. I'm writing in luna and I dont think there is a category for that here, but this probably is just general code. But if its in the wrong place, my apologies.
loca...
Hello.
I currently have a tab layout with 2 tabs, one tab with a list view and one with the option make strings so I can add them in the list view. Both tabs have their own activity because this made the code much more structured, and I dont have to repeat my self later.
Lets say im in the tab that offer me to create an string, and i p...
I want to bulk insert about 700 records into the Android database on my next upgrade. What's the most efficient way to do this? From various posts, I know that if I use Insert statements, I should wrap them in a transaction. There's also a post about using your own database, but I need this data to go into my app's standard Android da...
I'm developing a series of applications for mobile devices, we'll call them Orange, Cherry, and Pear. Now, because of my familiarity with Blackberry, I chose to begin implementing the first of these three applications, Orange, on the Blackberry platform. I found a way to integrate a number of Blackberry platforms (since they use relati...
I'm running mac osx.
I just cant find a answer to this error:
BUILD FAILED
/Users/ed_crub/Documents/Android SDK/tools/ant/ant_rules_r3.xml:395: The following error occurred while executing this line:
/Users/ed_crub/Documents/Android SDK/tools/ant/ant_rules_r3.xml:209: com.android.sdklib.build.ApkCreationException: Debug Certificate expi...
The line "return db.insert(DATABASE_TABLE, null, initialValues);" is returning a null pointer and I cant figure out why! I'd be grateful for any help
public class Database extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
...