Android :: Can I Get ID From Created Drawable
May 26, 2009
I created a new Drawable with: Drawable dx = resources.getDrawable(R.drawable.mydaysminipic_ov); dx.setColorFilter(0xff00ff00, Mode.SRC_ATOP);
and for: updateViews.setImageViewResource(predefinedDraw, --> ID from dx); I need the ID from it... but how to get?
Or any other Idea how to assign my Drawable dx to the above predefinedDraw?
View 2 Replies
Apr 3, 2010
I'm creating custom View that shows when necessary scrollbars. already figured out that i need to call initializeScrollbars(TypedArray) method but have no idea how to specify thumb Drawable when my custom View is created at runtime (not from xml layout).
View 4 Replies
View Related
Oct 19, 2010
I am running my application in the emulator using a high density skin (like WVGA800). However the ressources in my application are loaded from the drawable- mdpi folder instead of drawable-hdpi ... what else should I do so that android use the correct folder ?
View 4 Replies
View Related
Aug 25, 2010
This is a follow up question of http://stackoverflow.com/questions/3550593/sending-html-commands-over-httpclient-android , I have successfully Posted to the server and received 200 code but when I attempt to move to another page it does not recognize that I have logged in. I am wondering if it is a session issue or if i need to follow the redirect after the POST. How would I go about following a redirect?
View 1 Replies
View Related
Aug 14, 2010
I have a ContentProvider which is declared in the Manifest, when is it really created ? When the application is launched but before launching the first activity ? When the first query/update/insert is done ? When ?
View 1 Replies
View Related
May 30, 2010
I am making an event application and user can set a reminder for events he wants. So i use the alarmManager to create alarms. I would like to put a cancel all option to my main activity so that i could cancel all the alarms created by my application. The usual method for canceling the alarm with the same intent doesnt really help cause i set tha alarms on a different activity than the one I want to cancel them in. So is there a way to cancel all the alarms created by my application?
View 1 Replies
View Related
Jul 14, 2010
I'm slighty puzzled about how android's AppWidget machinery works. I reimplemented the AppWidgetProvider's constructor like this:
public class MyProvider extends AppWidgetProvider {
public MyProvider() {
Log.d("TEST", "Creating...")
}
public void onUpdate(..., int[] appWidgetIds) {
// updating stuff here
From what I've read in the docs, I understood that AppWidgetProvider is instantiated once, when widget of that type is added for the first time. If another widget of the same type gets added, it will be managed by exactly that provider.But I just discovered that this is not the case. For each widget I add, android creates a new MyProvider (I see that from 'adb logcat' - it prints "Creating..." for each widget)!I don't understad why. Maybe I got something wrong? Or documentation isn't clear on something. What's the reason of having appWidgetIds passed to onUpdate and other methods if each provider is managing only ONE widget?
View 2 Replies
View Related
Mar 4, 2010
Some times after installing my application and first running my application is creating two processes as follows.
CODE:................
View 4 Replies
View Related
Jun 22, 2009
I'm wondering where files that are created while running in a simulator are stored. I'm running the 1.5 simulator on Windows Vista. The real reason I want to find the files is because I am downloading an png file and trying to create a bitmap via:
Bitmap bitmap = BitmapFactory.decodeFile(iconFile.getAbsolutePath());
However, the bitmap is always null. I am able to create a bitmap successfully if I have the file as a resource.
View 7 Replies
View Related
Jul 5, 2010
I don't see an option for naming a folder that you have created on your desktop. You can do this on blackberry.
View 4 Replies
View Related
Mar 18, 2010
I have a module that builds an app called MyApp.I have another that builds some testcases for that app, called MyAppTests. They both build their own APKs, and they both work fine from within my IDE. I'd like to build them using ant so that I can take advantage of continuous integration.Building the app module works fine. I'm having difficulty getting the Test module to compile and run.I used android create test-project -p MyAppTests -m ../MyApp -n MyAppTests to create the necessary build files to build and run my test project. This seems to work great (once I remove an unnecessary test case that it constructed for me and revert my AndroidManifest.xml to the one I was using before it got replaced by android create), but I have two problems.Any idea what's causing the "Class ref in pre-verified class resolved to unexpected implementation" error?
View 3 Replies
View Related
Apr 28, 2009
I've created game, everything works fine on all previous android versions except current cupcake 1.5. It works even on cupcake pre release.I'm using exact the same build.xml, sources and resources. The problem is that surfaceCreated is not called : SurfaceHolder mSurfaceHolder = getHolder(); mSurfaceHolder. addCall back(this); setFocusable(true); WaitForScreen(); - here I untill surfaceCreated change variable that it's ready,but it's never called. I just can explain that I'm running SurfaceView activity after stopping regular View activity (for the game menu - it was easier to create it). Please help me if you can figure out something. I'm just a developer not a Android engine tester. If they are putting such stuff to the market they should test it a little bit (not talking about discovered VM crashes instead of exceptions).
View 4 Replies
View Related
Oct 6, 2010
I created a data base named as example.db with some tables in SqlLite. It worked fine. It was also created in data/data/com.mypackage.myapp/databases/example.db. Now, I need to open that database and see the content in the database.
View 1 Replies
View Related
Jun 13, 2010
Created a profile using content provider. After running it correctly, added 3 fields to the table. But now its not working corrrectly.It shows an error like "android.content.res.Resources$NotFoundException: String resource ID #0x4d2".Any solution?
View 1 Replies
View Related
Mar 8, 2010
I create one static library(alogrithm.a) by using android 2.0. Now I want to use this library to work at android 2.1. Can I rebuild source code to create at android 2.1? Or directly use this library binary file by creating android 2.0?
View 3 Replies
View Related
Oct 30, 2010
I'm writing a task manager app that downloads a list of tasks and subtasks from a server and creates a new checkbox for each item and adds it to a linear layout (called ll below). The problem I'm having is that I cannot set the "layout margin left" using Java like I can with XML (this is for the subtasks to indent them a bit on the screen). I can set most other XML properties, but cb.setMargins() doesn't work (says undefined for type checkbox).
View 1 Replies
View Related
Jul 15, 2010
I created a button and set the background image on it.How can I set the text below the graphic to sit on the bottom but not on top of the graphic?
View 4 Replies
View Related
Jul 23, 2009
I have a problem with creating a trace file containing logs on my app. I use Debug.startMethodTracing("tracing"); and in my onDestroy() method i stop the methodTracing. Everything is going fine, like my file is created on my phone BUT it is empty, and i don't get why because it worked once and since i can't get it working. Here is the log ive got, and it says that it is writting on the file, so this is acting a bit weird. Code...
View 3 Replies
View Related
Jun 9, 2010
I have a problem about taskAffinity of Activity. Activities A and B with the same taskAffinity.
A starts B with FLAG_ACTIVITY_NEW_TASK and the B starts A with FLAG_ACTIVITY_NEW_TASK again. Dumpsys activity of system gives us task stack like below: TOP-> A B A
According to SDK's reference to FLAG_ACTIVITY_NEW_TASK, the result is supposed to be like below: TOP -> A B
If we did not set taskAffinity, A will not be created again but in different task stack from B. (A and B are in different Apps)
After a little more research, we found FLAG_ACTIVITY_REORDER_TO_FRONT is what we want.
My question is whether SDK' reference to FLAG_ACTIVITY_NEW_TASK is wrong?
View 8 Replies
View Related
Aug 3, 2010
I've completed my login page. My problem now is I can only log in using the first account created. I found out that I have not complete my login page. The missing item is the while..loop code so that the application will check the other existing user instead of only looking for a match for the first user.
CODE:.............
I do know that the code is something like while (c.moveToNext()) but I do not know how to apply it on my if..else statement.
View 1 Replies
View Related
Jul 21, 2010
I have an IntentService that downloads some files. The problem is that I create a Toast inside the IntentService like this
Toast.makeText(getApplicationContext(), "some message", Toast.LENGTH_SHORT).show();
The Toast will never disappear event if I exit the app. The only way to destroy it is to kill the process.
What am I doing wrong?
View 2 Replies
View Related
Nov 16, 2009
I'd like to write sthg like a logger for my Android phone where I log whenever an application/activity is started respectively created. So it's not only about my own stuff but about all the stuff that gets started on the phone. Is there sthg like an intent flying around or any kind of stuff that I could catch?
View 6 Replies
View Related
Jun 26, 2009
I create a local file in my activity like this: How can I pass the URI of this file to another Activity? And do I need to set any permission (file permission, manifest permission) to allow other Activity to use that file?
View 5 Replies
View Related
May 14, 2009
I have a piece of code that creates some APNs with this call: -- getContentResolver().insert(Uri.parse("content://telephony/carriers"), apnData); The APNs are correctly created both on fw 1.1 and 1.5 (a query correctly returns them) but on fw 1.5 they don't show up in the device APN settings screen.
Has anyone any hints on the reasons of this behavior?
View 2 Replies
View Related
Jan 29, 2010
I would like to delete a complete database created by my application.
Do you know any adb command, or android sentence to do it?
View 3 Replies
View Related
Aug 25, 2010
I am new application development. I am using Eclipse for making applications. When trying to create new project using Eclipse It is not creating simple res/drawable/ instead its creating three drawable folder. i.e. 1] drawable-hdpi 2] drawable-ldpi, 3]drawable-mdpi What is this all three for? General scenario as per Google it needs res/drawable/ to save icon image. Now on Eclise where to save icons? On all folder or?
View 4 Replies
View Related
Oct 19, 2010
According to official documentation Google says that "Once you've defined your Drawable in XML, save the file in the res/drawable/ directory of your project." is the way to add a XML drawable to the project. But when I created the project ADT created 3 different drawable folders for mdpi, hdpi, and ldpi. So when I wanted to create my XML drawable, I right click on my drawable-hdpi folder and select "Add new Android XML file", and there I have to select what kind of XML file I want to create, but there isn't "drawable" to select. If I create new text file and save it as button_drawable.xml Eclipse says that there is an Error in the file and that It can't build my project.
View 3 Replies
View Related
Oct 3, 2010
When i have an ImageButton and a drawable and i want to do something like the Drawer or Twitter where when i press the button and the corner of the image is highlighted over the edge, in drawer its yellow, in twitter its white. Like the one below.How do i set my drawable without using a lot of images?
View 1 Replies
View Related
Feb 8, 2010
In this linked image , I see the button on the right quite often in a lot of apps. On my Moto Droid, it is used extensively in the settings app. It is also used as the default AlertDialog icon. Can I use this via a android.r.drawable?
View 2 Replies
View Related
Jan 9, 2010
I want to make a Drawable touchable for a component I am creating, does anyone know how to do that? code...
View 2 Replies
View Related