I've got an activity for which I've defined an intent filter statically in AndroidManifest.xml. I'd like to register additional intents dynamically to that same intent filter in the activity's onStart() method. Is this possible? I'm trying to avoid having to implement a separate intent receiver class.
...
Hey there. My app is going to be using an array of 64 ImageButtons (8x8), and they're all already declared in my XML Layout with names like one1, two5, eight8, etc. Rather than declare these each individually in my Java I thought it might be smart to declare them all in some for loops. I have
ImageButton musicGrid[][] = new ImageButton ...
I have an ImageView that contains a bitmap. Now the bitmap can change size within a known range. This makes the surrounding views to relocate which I want to prevent. I've tried setting margins and padding for the ImageView but without success. Any ideas?
Thanks,
Christian
...
Hi,
I have four groups in a listview each with four url's I want to load in a webView. When the user select a url to goto I set a value like so;
if (position == 0) webb = webb +2;
{
Intent intent = new Intent(this, official.class);
startActivity(intent);
}
I then carryout the intent to move to the webView class whe...
Hi guys,
I have a WebView that I've added to a view group:
webView = new WebView(context);
addView(webView, ViewGroup.LayoutParams.WRAP_CONTENT);
This lives in my viewgroup's constructor.
Then on layout, I want to do this:
webView.measure(View.MeasureSpec.makeMeasureSpec(getWidth(),View.MeasureSpec.EXACTLY),
View....
Hi All
I'm playing video on Android using media player via RTSP. The player takes about 12s to buffer before it starts playing. Anyone know how I can convince the player to buffer less? I have full control over the RTSP server and the SDP it returns.
Regards
Phil
...
The following code was copied from one project to another. No errors in project one. In project 2 I get:
-The method onClick(View) of type new View.OnClickListener((){} must override a superclass method
-implements androd.view.View.OnClickListener.onClick
The project settings look the same, but I must be missing something.
private Bu...
In the lunar lander example, if I add the following two lines to the top of the doDraw method, the app crashes immediately with a NullPointerException:
Matrix m = canvas.getMatrix();
canvas.setMatrix( null );
Stack trace is:
FATAL EXCEPTION: Thread-8
java.lang.NullPointerException
at android.graphics.Matrix.preConcat(Matrix.jav...
I'd like to make my Android app responsive, even when the network connection is not.
For certain calls, the data doesn't change that often, so I'd like to be able to retrieve the most recent XML response for a given call.
Ideally, I'd like to do this similar to how web caching works, hash the call/params, set rules as to expiry, etc....
I have a app that is started by a received intent (calendar alert).
It may be started multiple times just one after a other (with a few sec between them).
Now i want it to stack the screens from the top down..
So first start of my app gets the view...
if it's fired again while first is still shown..but this one below so when user has ...
Hi,
Instead of using in my layout ImageView and TextView I am now adding the image like this:
text.setCompoundDrawablesWithIntrinsicBounds(0, mImagesId[position], 0, 0);
In order to add border to the ImageView I defined a shape xml that I am using as a BackgroundResource.
How can I now add the shape to the TextView image up compound ...
My simple audio streaming app works perfectly in 1.6 and 2.1 does not work in 2.2. I have no clue as to why. It works fine on the emulator, on actual 2.2 devices the audio stops unexpectedly after about 10 minutes or so. When I looked at logcat on my phone (HTC EVO) I see this:
I/HTTPStream( 65): 1358 Bytes read, progress 34346/65536...
How can I call a Webservice with a byte[] parameter? Tried using the namedvaluepairs, but they take strings only. I am not using the Ksoap2, we decided to use the HttpClient / HttpPost method.
Anyone have any ideas?
Here is my code:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setCont...
I would like to modify the background of the title bar of the dropdown dialog associated to a spinner.
If this is not possible I would like to know what resource is used to draw this background android.R.drawable.* ?
This is an effort of uniformity for my various pop ups in my application.
...
I'm finding the need to lay out a fairly complex UI manually, by giving the dimensions and position of most all of the sub views. My plan is to code the XML initially for a 480x320 display, get it all working right to demo for the client on a given device, then modify it for production by programmatically adjusting the size and position...
I find the force close Report option very useful as a developer- the stack trace is really useful to see and I've been able to solve many bugs by using it.
However, there are places in my app where (quite rightly) I've used a try/catch statement to handle Exceptions. The problem being, that this prevents a force close and so I can't ge...
I'm trying to user the LayoutInfator to create a view. One of the options I'm thinking about is using the default android.R.layout files. However I'm finding it difficult to locate these files/how they look. It would be great if I could get some help in locating the source. I need to find the id's of the individual elements within those ...
How to detect if there is a front camera and if there is how to reach and use front camera ?
...
I develop app for time alerting ( for example when you need to drink medicine - it repeats at time intervals ). How can I implement that service runs forever in background ? Is that possible at all ?
...
I've got TCP client app which successfully negotiates connection to server and receives buffered output, but what I need to know is how to read server responses without waiting to buffer to fill out or server to end connection.
In this loop:
BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String i...