android

How we place the image in Rectangle in canvas

Hi In canvas we have drawrect() method for drawing rectangle.but now i want to fill it with Image view.For this what can i do .Give me some suggestions.Thanks in advance. ...

Dynamically change the background LinearLayout

How to dynamically change the background LinearLayout? ...

Pass Control By Name To findViewById

Hi, If you got: Button btn = (Button) findViewById(R.id.widget28); where "widget28" is the name of your button, how can you pass this into the findViewById as a String? or get it from R class as a string? I want to get the Button instance by string and not by the hard code R.id.widget28 reference. thanks ...

A mutable MediaPlayer class that extends or uses android's MediaPlayer class

Hi all, I've been developing a cool game for android recently (http://www.androidzoom.com/android_games/cards_and_casino/the-best-card-game-everyaniv_jrbe_download.html) and I've been getting requests for a mute button. So I've implemented all the required UI stuff and I'm using the application's sharedPreferences to store the isMuted st...

Why he return 11 all the time ??? (btw. now is 16 h my local time)

private void hour() { Toast.makeText(this,String.valueOf(Calendar.HOUR_OF_DAY),Toast.LENGTH_LONG).show(); } ...

Android Sensor.TYPE_LIGHT unity

Hi, Does anybody knows the unity of the return value of Sensor.TYPE_LIGHT on Android ? Thanks. ...

Android: How to modify Settings app?

I would like to hack around the Android default Settings app for prototyping purposes. What is the correct procedure for building and installing the "customized" app? After I modify the Settings source in the platform source tree, how to I build it? After I build it, can I install Settings by itself, or do I rebuild and reinstall the en...

OnClick issue in android

Hello In my android application i am focusing the clicked row when the user clicks on back keypress.But my issueis like when i click on the row its first getting focused and then on another click it navigates to another page. Below is my code public void onClick(View v) { // TODO Auto-generated method stub ((TableRow)v).s...

Looking for Android Development Java Game Script

Hello everyone. I'm working on developing a game in Java for android phones and I was wondering if there was a place to view a complete game script so I could see all the components and how it's setup? Kind of like a dissection self-tutorial. Either a developer or website that offers game scripts in their entirety for android phones? I'm...

Android's viewDidLoad and viewDidAppear equivalent

Does Android have an equivalent to Cocoa's viewDidLoad and viewDidAppear functions? If not, then how would I go about performing an action when a View appears? My app is a tabbed application, in which one of the tabs is a list of forum topics. I would like the topic list to be refreshed every time the view appears. Is such a thing poss...

Java abstract class inheritance question

I have an abstract class with a single concrete method. In this method I want to use a static class variable from the classes that derive from the one the method is declared in. To do so, I of course have to declare this static variable in the abstract class as well. When the method is called, the variable is resolved to the one in my...

Problem in Image click event

friend's I have image back and forward image in my footer,by using it i have to navigate to next page,but the problem image click have not changing the function call when click image is to changed. i'm using click events for both here code for backward image img_back setOnClickListener(new OnClickListener(){ void OnClick(view arg1){...

Android: ScrollView 'setOnScrollListener' (like ListView)

Hi all, I want to do something when the user has scrolled >90% down, so I thought I could just add a onScrollListener like I would in a ListView. Unfortunatly, ScrollView doesn't seem to have a similar method. Is there any way I can do what I want; getting a notification when the user scrolls approx 90% down? Thanks, Erik ...

Out of control ListView

I'm having a problem with a ListActivity. I've extended ArrayAdapter and Overridden getView to fill in the data for each row. I throw some data from my Adapter's ArrayList into a TextView. My problem is, when I scroll, the TextView of each row populates with text that is not in its corresponding data in the ArrayList. What I mean is:...

Problem in implementing Parcelable containing other Parcelable

I'm implementing Parcelable class that has another Parcelable insde. In OuterParcelable class: @Override public void writeToParcel(Parcel dest, int flags) { Bundle tmp = new Bundle(); tmp.putParcelable("innerParcelable", mParcelable); dest.writeBundle(tmp); and then: public OuterParcelable(Parcel parcel) { super(); ...

Font padding problems with Droid font in Android

I'm trying to create some 9patch images that have some text as their content. I define the stretchable area with a black pixel line top and left. And I define the content area with a black pixel line right and bottom. However, it seems as though Droid is adding padding to the top and bottom of the content area, messing my layouts up. Ha...

AsyncTask interrupted exception in Android?

I am facing an issue with AsynsTask in my Application. I really do not understand the reason of it happening. The issue is "The application works perfectly usually, now when any of the activity is displayed on the screen and I keep my device idle for a longer period of time. Then when I make the keyguard on the view of the last active a...

NullPointerException in handleStopActivity -- No reference to my code in stack trace.

Hi, I'm a bit at a loss, here. I've been seeing a steadily increasing number of these NullPointerExceptions in handleStopActivity. I suspect that the increase is coinciding with the increase in 2.2 upgrades to Droid owners, though that's just a guess. I've never seen the crash myself, and the stack trace provided by the market does not m...

Android - Live Wallpaper offset clipping

Hello, I am writing a live wallpaper for android. To test my basic code was working I drew a rectangle in the top left-hand cornor of the screen: canvas.drawRect(0f,0f,50f,50f,paint); Half of the rectangle was underneath the bar at the top of the home screen. I tried to take into account pixel offsets using: public void onOffsetsC...

Android, anisotropic filtering?

I'm just learning OpenGL ES on Android, and I am trying to get some kind of anisotropic filtering on textures. I want to increase the size of a sprite, with some kind of interpolation, instead of this "nearest-pixel-interpolation". Is there anything like this in the OpenGL ES standard or do I have to make one texture for each size? ...