android

Android title bar removal

How do I remove the title below the battery, time bar from showing up? Not sure the terminology for that bar, but on this picture it is the "Nested XML Layout" bar: ...

android emulator is start but window show blank screen

WARN/WindowManager(61): No focus window, dropping: KeyEvent{action=0 code=82 repeat=0 meta=0 scancode=229 mFlags=8} ...

How to rename an private file of my application?

Hi! I want to rename an context private file created with openFileOutput() but I don't know how... I tried that: File file = getFileStreamPath(optionsMenuView.getPlaylistName()); // this file already exists try { FileOutputStream outStream = openFileOutput(newPlaylistName, Context.MODE_WORLD_READABL...

Android multi line editText (Text area)

I want to have 5 line in height text area following code i am using. <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:singleLine="false" android:lines="5" android:layout_marginLeft="10dip" android:layout_marginRight="10dip" ...

how to read image in byte convertion in android java application

hi i am implementing upload image how to read image in byte convertion ...

Is java.util.Scanner that slow?

Hi guys, In a Android application I want to use Scanner class to read a list of floats from a text file (it's a list of vertex coordinates for OpenGL). Exact code is: Scanner in = new Scanner(new BufferedInputStream(getAssets().open("vertexes.off"))); final float[] vertexes = new float[nrVertexes]; for(int i=0;i<nrVertexFloats;i++){ ...

Get image url from rss Cdata

Hi , I start testing android , trying to get image from xml my Image is hosting inside xmlnode <a href="http://www.site.com/id/?id=41564&quot;&gt;&lt;img src="http://www.site.com//news/images/2010/03_march/imagestock/thumb/22.jpg&quot; align="left" /></a> more text comes here i trying to get the http://www.site.com//news/images/2010/0...

How to create a Button in android otherthan from Xml files?

Hi I want to create a Button otherthan creating it from xml layout.i want to create the button in java class otherthan using any resources folder .please anyone help me to solve this ...

Delphi To Java code conversion: image.canvas.pixels

I'm trying to convert an old Delphi program I wrote into Java to compile and run on my Android phone. I'm running the Android 2.1 operating system but am using version 1.6 of the SDK. I have a routine in Delphi where I set the colour of pixels on a canvas individually along the lines of: image1.canvas.pixels[x, y] := GetMyTColor(x, y);...

Best approach to show big amount of "grid" data in Android

Hello all. I am building an application for Android (1.5) that, after quering a webservice, shows to the user a big amount of data that should be displayed in a "grid" or "table" style. I must show a result of about 7 columns and 50 rows (for example a customer list with names, adresses, telephone number, sales amount last year and so)....

Detect touch on bitmap

Greets, Does anyone how I go about detecting when a user presses on a bitmap which is inside a canvas? Thanks ...

Android: When do classes get unloaded by the system?

Hi, This is a very weird problem. My app that runs just fine but somehow if I leave my phone for an hour or two while my app is running, I get the following error when I come back to it later: java.lang.NoClassDefFoundError: yoga.database.Manager at yoga.YogaActivity.openDatabase(YogaActivity.java:294) at yoga.YogaActivity.initData(Yo...

Android: How to restore List data when pressing the "back" button?

Hi there, My question is about restoring complex activity related data when coming back to the activity using the "back" button". Activity A has a ListView which is connected to ArrayAdapter serving as its data source - this happens in onCreate(). By default, if I move to activity B and press "back" to get back to activity A, does my ...

Android Asynchronous calls

Hi, Im making an asynchronous call from a class to another. Here is my actual code: public class HttpRequestHelper extends AsyncTask { @Override protected Object doInBackground(Object... params) { try { // Create a URL for the desired page URL url = new URL("http://www.google.com"); // Read all the te...

Android - Audio recorder FileNotFound

Hi, I'm trying to record audio this.recorder = new android.media.MediaRecorder(); this.recorder.setAudioSource(android.media.MediaRecorder.AudioSource.MIC); this.recorder.setOutputFormat(android.media.MediaRecorder.OutputFormat.DEFAULT); this.recorder.setAudioEncoder(android.media.MediaRecorder.AudioEncoder.DEFAULT); this.recorder....

How do I use the session in WebView in my other stuff (Android)?

The user must login through the WebView. Of course, the session is for that WebView. But, what if I need to make REST API calls during my Android application? Those REST API calls need the session to be authenticated , otherwise those will not work. Is there any way I can attach the cookies of WebView into everything I do in Android? ...

Android: How to apply a border at Buttons over stylesheets?

I have some buttons orientated in a vertical LinearLayout with the default menuitem_background applied to them (Which gives them a transparent background at default state and a highlighting color on click/press). <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_h...

drawPosText() in android.graphics.Canvas, What is origin?

drawPosText(char[] text, int index, int count, float[] pos, Paint paint) Draw the text in the array, with each character's origin specified by the pos array. Does anyone know where exactly does drawPosText consider the "origin" to be, since you are specifying "origin" as coordinate pairs; i.e., is it bottom-left of characte...

How to implement my very own URI schema on Android

Say I want to define that an URI such as: myapp://path/to/what/i/want?d=This%20is%20a%20test must be handled by my own application, or service. Notice that the schema is "myapp" and not "http", or "ftp". That is precisely what I intend: to define my own URI schema globally for the Android OS. Is this possible? This is somewhat analo...

How to setHeight for a ViewGroup

Hi, Can you please tell me how can I setHeight for a ViewGroup? I see there is a layout(l,t,r,b); But that is different form setHeight(), since I don't know where should be the top/bottom of the viewGroup. I need to set the height of the ViewGroup and return that to ListAdapter. Thank you. ...