android

finding out Class Name

Hi.. From ApplicationInfo we can get the name of the package of the apk running. For example I have in my code { ApplicationInfo xyz; String abc= xyz.packageName; } This would return the name of the package of the application running. But can we find out the name of the class as well from the name of the .apk running or the one we are t...

Will Asio or Boost.Asio works in iPhone or Android?

Anyone know will Asio or Boost.Asio can be used in iPhone or Android development? I'm thinking to use it so I don't need to use difference network library for difference platform if it is cross platform. ...

Java - Set Color by switch case function

I want to set the color of the TextView by the function getcolorss. I tried a lot of different ways but i cant get in it. Please help me i think the solution is easy. import java.awt.*; import android.graphics.Color; public class test extends Activity { TextView text1 = (TextView) findViewById(R.id.text1); text1.setTextColor(getcolor...

How do you store and retrieve data from a text file in Java / Android?

The question is in the title. ...

How to get the visible size on an Activity?

How can I know the visible size of my activity? I'm trying to get the Activity real size, not the height and width from getHeight() and getWidth(), which gives me the screen full size. ...

Help needed for android quiz app

MY issue is that only the last option text is changing on the click of the Next button and the rest remain same. There is some problem with the loop i think.Can someone sort this out please.Thank you Here's the db class: package com.myapps.quiz; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import j...

Is there any character limit in android textview?

I'm trying to enter more than 2000 - 3000 characters in an android TextView it does not display anything. any one guide is there character limit on android textview or what ? ...

Logging messages from real device on Logcat

Hi folks, while my time developing on android I was looking for a functionality to get logcat messages from my real device (when starting an app on it from eclipse) and not only from my emulator... Does someone know how to enable such a feature? greetz. poeschlorn ...

problem while place the radio buttons inside the liview in android?

Dear Everyone, I have a listview with radio button. when i click any option and scroll that list view the previous select will cleared.How to do this. The actual problem is when scroll the view on every scorll the view is refreshed, that's why every time the view is refreshed. How to do this I can't get any solution, Plz. Help. Thanks &...

Opening a Dialog with text input from within a View in Android

Hi, I have an app with a View based on the SurfaceHolder (similar to the Lunar Lander tutorial). The whole GUI is drawn on a canvas, and I want to be able to prompt for user text input at a given moment using a custom layout Dialog, that is then taken care of and rendered to the canvas using standard procedure. My problem, however, is ...

Android ListView with alternate color and on focus color

I need to set alternate color in list view rows but when i do that it removes/ disables the on focus default yellow background I tried with backgroundColor rowView.setBackgroundColor(SOME COLOR); also with backgrounddrwable. rowView.setBackgroundColor(R.drawable.view_odd_row_bg); <?xml version="1.0" encoding="utf-8"?> <selector ...

invalidate(Rect) from onTouchEvent causes one extra invalidate()

Hi, I have this strange problem. I use a View. When I first run the program it shows the View correctly. Then if I 'invalidate(Rect)' a part of the screen when 'onTouchEvent' is clicked it invalidates all the screen and not only the rect I asked for. This happens only when I initially start my app and only one time. After that first ti...

How do I move an image (ImageView) in AbsoluteLayout to X Y [android]

my main.xml look like this: <AbsoluteLayout android:id="@+id/AbsoluteLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"&gt; <ImageView android:layout_height="wrap_content" android:layout_x="247dip" android:layout_w...

RadioButton and EditText inside ListView problem

I want to implement RadioButton and EditText inside a row of a ListView. I am using an ArrayAdapter to populate the List. But the problem is that when i am selecting a RadioButton and scroll down the list and scroll up again the Radiobutton which had been selected is unselected. Same with the content of the EditText. The text getting rem...

findViewById returns null in new Intent

I am having a problem where in the started Intent, the findViewById returns null. Is there anything special I should know about starting a new intent? It goes something like this for me: //in the MainList class Intent stuffList = new Intent(this, StuffList.class); then in the new Stuff's constructor: public class StuffList extends ...

how to change the layout margin for an Android ListView Programmatically

Hi, I have defined an List View in xml as below <ListView android:id="@+id/mylist" android:layout_width="fill_parent" android:layout_height="wrap_content" android:cacheColorHint="#00000000" android:layout_weight="1" android:layout_marginTop="95dip"/> And i need to re-defin...

can we use layout in Customview ?

friends, i have a custom view class public class Zoom extends View { private Drawable image; private int zoomControler=20; public Zoom(Context context) { super(context); image=context.getResources().getDrawable(R.drawable.icon); setFocusable(true); } ...

AlertDialog crashes application

Can someone explain to me why this AlertDialog crashes? package com.clicker; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget...

IOException when running Android projects in Eclipse

Every time I try to run an Android project from Eclipse with the Android plugin (Run -> Run), the emulator starts up just fine, but the upload fails, and the Console puts out this error message: [2010-06-17 08:17:55 - HelloAndroid] Failed to upload HelloAndroid.apk on device 'emulator-5554' [2010-06-17 08:17:55 - HelloAndroid] java.io.I...

What is the android_metadata table?

I try to integrate an existing database file into my Android project. I follow the instructions on this blog. They write that I have to add a table android_metadata with a column called locale and put en_US into it. I try to figure out what this table is used for. Because my database content is german. Maybe i then should not put en_U...