This is my activity class i want to add one textview to TableRow but i cannot show the textview in TableLayout.
Activity
import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup.LayoutParams;
import android.widget.TableLayout;
import android....
I am using below code for scheduling a task in android but its not giving any results. Please advise on the same.
int delay = 5000; // delay for 5 sec.
int period = 1000; // repeat every sec.
Timer timer = new Timer();
timer.scheduleAtFixedRate(new TimerTask() {
public void run() {
Toast.makeText(getApplicationContext(),"RUN!"...
When I create preference activity I define all preferences in xml file. Every preference has a key defined in this xml. But when I access preference I write:
SharedPreferences appPreferences = PreferenceManager.getDefaultSharedPreferences(this);
boolean foo_value = appPreferences.getBoolean("foo_key_defined_in_xml", false);
Is there ...
Hi i have a problem programming with android SDK 1.6. I'm doing the same things of the "notepad exaple" but the programm crash when i try some query. If i try to do a query directly in to the DatabaseHelper create() metod it goes, but out of this function it doesn't. Do you have any idea?
this is the source:
public class DbAdapter {
p...
I want to stop user from entering white space into the edittext, easiest way is to do not have button in keyboard appearing on click.
how to hide white space button from keyboard ?
or is there any other way to stop user entering white space into the edit text field.
...
I have an activity with three listviews, each having three different cursors, but all have the same ContextMenu show/resolve code and when the selection event fires, I want to get the ListView to refresh it.
I can't use menuInfo.targetView, as that holds the LinearLayout for the ListView row, and not the ListView.
in this method
publ...
What is the distinction between MIDP and JME?
How do both relate to Android? As far as I understand JME isn't supported on Android - is that correct?
Thanks
...
I don't get it and I can't find it by myself. How to display (and update) a route between two locations (for example, current device location and destination) in Android application using Google Maps API?
...
I'm trying to display a list of available sensors but it's like there are not!
I was thinking that it was because of the emulator, but i tried it on the phone and the result is the same.
private SensorManager mSensorManager;
TextView mSensorsTot,mSensorAvailables;
......
public void onCreate(Bundle savedInstanceState) {
super.onC...
Is any SDK version which support Windows 2000? r05 doesn't - I found that \android-sdk-windows\tools\emulator.exe imports from WS2_32.dll functions freeaddrinfo, getaddrinfo and getnameinfo which missed from this library.
...
I need to calculate a rotation vector out of the data i get from Sensor.TYPE_ORIENTATION.
The sensor data is defined like this:
the values have to be recalculated to become a correct 3d position: values[0]: Azimuth, angle between the magnetic north direction and the Y axis, around the Z axis (0 to 359). 0=North, 90=East, 180=South, 27...
Hi,
i have been developing an Android App, and within this App I have a main class which can be seen as a control/management class...
It's a plain Java class and it connects all the Activity's, Services, ListView's etc...
It also should be able to keep track of all existing aforementioned entities...
I noticed thoug, because every Activ...
Hi all,
I have a HorizontalScrollView with a series of CompoundButtons. I want to find the (x,y) for a given child view. I have tried using:
getLocationOnScreen()
getLocalVisibleRect()
getChildVisibleRect()
like this:
View tmpView = this.findViewById(viewId);
Rect hitRect = new Rect();
tmpView.getLocalVisibleRect(hitRect...
I'm writing an android app where I need to use AES. Is it better to use the bouncy castle libraries or should I just stick with what is included in default android libraries?
...
Hi everyone,
here's my scenario: I start an Activity A via an AppWidget. The AppWidget displays (inter alia) 3 buttons. Each of them has its own intent. They are designed to provide information to the Activity via a class called AppWidgetReceiver. In latter I create an intent like this:
Intent i = new Intent(context, CreateNoteActivity...
Im using
// this is a DefaultHttpClient
List<Cookie> cookies = this.getCookieStore().getCookies();
Now, since Cookie does not implement serializeable, I can't serialize that List.
EDIT: (specified my goal, not only the problem)
My goal is to use the DefaultHttpClient with persistent cookies.
Anyone with experience that could lead...
Have you ever met such problems? When exiting the activity in a thread in a SurfaceView.
This log appears in this situation:
05-18 15:20:20.344: ERROR/AndroidRuntime(2018): Uncaught handler: thread main exiting due to uncaught exception
05-18 15:20:20.355: ERROR/AndroidRuntime(2018): java.lang.IllegalArgumentException: parameter must be...
Do you know any books, articles, examples, screencasts that document how to develop an home screen widget on Android?
I just found these links:
widget design guidelines
Introducing home screen widgets and the AppWidget framework
I would like to develop a tiny home screen ticker and i'm searching for the proper way to code it.
...
I am resusing ImageViews for my displays, but at some point I don't have values to put it.
So how to clear an ImageView in Android?
I've tried:
mPhotoView.invalidate();
mPhotoView.setImageBitmap(null);
None of them have cleared the view, it still shows previous image.
...
According to Android SDK MediaRecorder.setCamera can be used to recycle the existing camera instance for video capture and preview without resetting the preview. I was not able to find any sample, and all my attempts were futile: I either get the wrong state exception, or MediaRecorder.prepare fails.
Does anyone know if this method usa...