How to Change the default Application image in android? - android

How to Change the default Application image in android??we want to distinguish our application to other android application.so we i want to change the default android application image to sepate image.
how this can be done?anyone pls help me?

Put an image in your project and reference it in your androidmanifest.xml file with
android:icon="#drawable/icon"
in the <application> part
Random reference with a tiny bit more detail: http://www.connorgarvey.com/blog/?p=97
(a bit offtopic, but this is a great page from the dev-guide for making icons: http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html )

Related

AndroidStudio Adding an image to draw with srcCompat

I am trying to do a drawer activity with Android Studio and I'm wanting to personalize the icons used. I've downloaded the icons I want to use and for the most part, it's okay.
In fact, I can modify all the android:icon icons but I have no idea how to modify the app:srcCompat icons. I don't know how to detect the image I want to use in this case...
Do you know how I can do it? Could you explain this to me?
Thanks a lot!
Edit: The file I'm working on as a base is the generated project with Drawer activity as the main activity. For example, if I wanted to modify the icon in the nav_header_main.xml file, how could I do to have my image (.png) transformed in a way detected by Android Studio as compatible with srcCompat
Ensure your image file is in res/drawable folder(or drawable-xhdpi/xxhdpi, determined by your design)
Refer it by app:srcCompact="#drawable/$IMAGE_FILE_NAME" in your xml.
Then you should see what you want.
Please check the doc to further understand the official usage.
Well... I was blind! I was wondering how I could add my icons but they were, I was just mistaking on the address... #android:drawable/... is obviously not #drawable/... but I didn't notice. So be aware that there is a difference and it'll be okay I think!

how to change image background via any file explorer

I am trying to understand how to change background image of an application (not via eclipse) using any file explorer in android(phone) and picking any file.png which will be saved as a background image in the app
Following the comments above:
Well, the only thing I can think of (if I understand this correctly, you want to change the background of an application, via another application - right?) is to set the background to Theme.Wallpaper. Then in that other application, you can set the background differently and in the base application, the BG will be changed accordingly.
Asuming - pick the file explorer, navigate to the .jpg, .png etc. file and you set it to be your device's background. If your application uses Theme.Wallpaper as the default application Theme, then it will be changed, according to the background image you've set to the device.
In simpler terms:
1. Problem - You want to change the background of your application (YApp for short), but you want to achieve this by choosing a picture from another application (let's say a Gallery).
2. Solution - the only thing I can think of is to set this desired image as a background to the device itself. Then in YApp you'll have Theme.Wallpaper set, which will use the device's background
To put this with code, here's a sample extraction from the AndroidManifest:
<activity android:name="MainActivity" android:theme="#style/Theme.Translucent">
</activity>
This could be applied to any activity. Here's the link for reference.
Cheers

Applying styles to an entire app or activity

In an Android book I have it says that themes can be applied to and entire activity or an entire application. It doesn't show how but the Android docs say to simply put the theme statement into the androidmanifest.xml file like so....
<application android:icon="#drawable/ic_launcher">
<activity android:theme="#style/bigred" . . . .
but it doesn't work. Only the application bar is styled with the big red type and the text in other widgets is not styled at all. How is this supposed to be done?
Also the docs say that to see what styles are available from Android to read the code! Any better docs than this?
Follow these tutorials it also helped me.customized-title and customized-title.
Try using actionbarsherlock.Go through their sample codes from this website.
Please review the following: How to Apply Styles to the all UI in Android

how to add a stable background image in a simple touch event application in android

I have to add a stable background image in the application given in the link below
http://obviam.net/index.php/displaying-graphics-with-android/
can anyone help with this
You can include the background image in your xml file. This is a great resource for learning android.

How to change default picture application to my own picture?

When I run my application, it's automatically create a droid-bot picture on surface of application. So, I want to change a picture, what should I do?
(1) create a PNG image (say icon.png) and save it in the folder:
res/drawable
(2) Then, in AndroidManifest.xml of your application add the icon tag in your application:
android:icon=”#drawable/icon”
e.g.
<application android:name ="yourAppMgr" android:icon="#drawable/icon"
//... >
AFAIK you can't change the icon of installed application with some completely custom one, but you can add application shortcut with custom image to the home screen from your application.

Categories

Resources