PreferenceScreen themed with honeycomb theme - android

i want to make to make an PreferenceActivity with the same style that can be found on the image below.
Image of Preference Screen Android 3.2 http://img600.imageshack.us/img600/5120/device20120320173903.png
http://imageshack.us/photo/my-images/600/device20120320173903.png
There any way to make a close match of it or do i need to program the behaviour?

I can think of two ways you can do. One is to download the source code, but I think that layout is custom for galaxy tablets.
The other option would be to use the Hierarchy View Perspective in Eclipse to determine the structure and details of the interface and from there replicate the interface.
Good luck!
Udapte:
Ok, if what you want is the drawables you can actually get them from the tablet. With a file manager in the tablet copy the file /System/app/System.apk to the SD card and from there to your computer. There change the extension to .zip and extract the contents. This way you can access only the drawables. The xml files are compiled so you can't see their content.
I think you can use this if you want more data out (like the xml layouts): http://code.google.com/p/android-apktool/
Although as I said in the comments I am not sure about the legality of this given this is Samsung's own IP.

Related

Android Multiple File Selector/Chooser Dialog

I have been scouring the internet for a simple easy to implement Android file chooser dialog that also has the option of selecting multiple files and returning a uri or string array with all the files selected.
Currently I use aFileChooser on github and it is according to me better than android-file-dialog. But neither address the issue of passing multiple files.
I am only an intermediate android developer but I think this would be something not so hard to implement by a pro.
I have looked at the code of aFileChooser and I think adding a check box to the file item would be the way to go but as far as code is concerned i am clueless and the developer seems he's not really gonna work on it in the foreseeable future
So in short im requesting for help to either add the select multiple files option to aFileChooser via the github or here, or maybe suggest to me a better dialog that does what i want.
I don't know any file chooser you could use, but I can show you how I made my own long time ago. It's actually pretty ugly, but it does what you ask for. You can select multiple files and an ArrayList<File> is returned via Intent.
So you could use it as an example of how to do it, and implement it yourself, if you really need it to (I wouldn't recommend you to use mine as it is now).
Here are the links to GitHub:
FileSelectionActivity.
Used layout file for the FileSelectionActivity.
MainActivity, on line 225 the FileSelectionActivity is started.
Below there's a screenshot of FileSelectionActivity, as I said, ugly.
"Go Up" goes to a higher level of the file hierarchy, there are two ListViews, one for directories and one for files. The files have checkboxes. When the share button is pressed, each item in the second ListView is checked to see if the checkbox is active or not. That's line 71 of the FileSelectionActivity file.
Anyways, I hope this helps you make your own file selector, or something.
Thank's to the answer above, I've made a simple library that addresses the concern. It not only passes an array of file paths but you can also use to select a folder.
It has thumbnails for image files
auto scrolls to last scroll position
will soon have language support for several locales
Here it is: https://github.com/tapaulo/Android-Multiple-file-Selector-Dialog

default selector for imageButton in Android

I'm trying to locate the Android XML and drawable files that are used by default for imageButtons.
I'm trying to customise an imageButton using a selector. When I create a new project, by default the background color of an imageButton is transparent-grey and it gets highlighted in blue when touched. (I'm SDK-19 and .Light theme). To avoid the hassles of re-creating lots of icons, I want to find the default XML selector code and 9.pngs Android uses for an imageButton.
Looking in the SDK android-19/data/res/drawable folder there are a bunch of XML selectors defined in files with names like "btn_default_holo_light" "btn_default_transparent" etc., and a bunch of button drawables in .../drawable-hdpi.
I can pick any of these, copy it into a "my_selector.XML" file in my project's drawable folder (plus copy the necessary drawables into my projects drawable_hdpi), and set "my_selector" as my imageButton's background. This all works fine...Except none of the SDK files I've found results in the default "blue when touched" effect (some turn the imageButton orange, others do nothing...).
I'm sure the default files are right there under my nose but I'm pulling my hair out trying to find them!
Any help appreciated
I am afraid you won't find the default images you are looking for in the SDK files. The default images can vary from device to device, rather than from android version to android version. The effect you are looking for is probably specific to your device/emulator.
"The appearance of your button (background image and font) may vary from one device to another, because devices by different manufacturers often have different default styles for input controls."
Reference^^
If you just want to get the images and copy them, you may be able to find them on the actual device by activating USB Debugging and searching through the usually hidden folders on your particular device. The storage of those files probably vary between devices so I am afraid I can't tell you where they are (some files are kept hidden even with Debugging active. In those cases apps such as ES File Explorer might be able to help). Although this probably wasn't the answer you were looking for I hope this helps.

How to change Android emulator booting animation

How to change Android emulator booting animation
The emulator uses an Android OS image to boot. You can't change this without changing the image. This isn't emulator specific, but for Android in general.
For more information on how to do that, you might look here, or just google "android change boot animation".
Once you have a new system image, run emulator -help-disk-images from your sdk/tools folder to see a ton of useful info about using disk images with your emulator. It tells you where to put the file, which differs depending on whether you're using the standard SDK or not.
That is not a string, it is a bootanimation. You can't set it to another text. You can change it so it is another animation though.
If you want to see other possible boot animations, google android boot animations.
For some reason, this is what most of my students and trainee ask about in every customization class.
The answer for that is - Of course you can modify that image .
To make a long story short:
You can actually do it for every device by storing a noncompressed zip file at /data/local/bootanimation.zip (just copy from CyanoGenMod and make sense of the animation layout and timing - that's the easiest way, and it explains much better than any explaination).
As I wrote in some other StackOverflow post, there are a couple of places you can do that (I disregard the encrypted case for the sake of simplicity):
system/media and /data/local/ .
The latter is preferable as it makes it easier to modify, and does not require the tedious
modification of the system.img (system partition) size.
Note that bootanimation.zip should be lowercase, and -0 compressed.
That is argueably the easiest Android customization (Well, if you have good graphic designers...)
That's not part of your application, is emulating an device. Remember that each android device have it's own Start up images and icons that can be related to the carrier or the brand of the phone, etc.
You cannot change that image, anyhow for what propose you want to change that?
Place a animation file in location /system/media/bootanimation.zip to override boot animation.
If you google around, you will find lot of tools to help you create boot animation (even from videos).

How do I re-use the default android title gradient?

If you create an activity and set a label without disabling the title bar you will see a title that uses a gradient as a background. Is there a way for me to re-use this resource without re-implementing it?
Thanks
I believe the background for this comes from the resource that is called "activity_title_bar.9.png" that is in the system drawable folder.
Here is a copy of it:
If you download it from here you'll have to rename it using the .9.png suffix. You can also find it in your SDK. The path is "SDK\platforms\android-4\data\res\drawable"
Note android-4 could be any other number that you happen to have installed on your machine.
Generally if you are wanting to use a system resource like this best practice is to save your own copy of it and include it in your project. Resources like this are subject to change at any time with new versions of the OS (or even with device specific skins that Manufacturers add on to the OS) So if you rely on the system copy from inside your app then you have no way to know for sure that it will look the same across all devices.

NetBeans and Android image

New to Android development and have decided to use NetBeans 6.9.1 as my IDE. So far the process has been somewhat painful, but I'm getting things rolling. However, I am creating an ImageView subclass for my first custom View and I can't figure out how to add my Box.png file to the project. Drag and Drop doesn't work, there are no right-click options to add a file to the Resources folder, no dropdown menus to add images, no way to add the image to a package. Could use some insight, thanks!
Just go to the project folder and copy the images you want into the res/drawable folder. The IDE helps you a lot with code completion, error checking, etc... but that simple task can be done by hand.
Then, you can reference your resources by using something like: R.drawable.image Notice that I'm not using the image extension. If you wonder what R is, let me give you a brief explanation:
Each resource that is saved in the resources directory is referenced in the R class. That's a file that is autogenerated by Android and it's used to reference those resources from your code. In this case, it will be in R.drawable.* since it's a drawable resource. There are other kind of resources, like layouts: R.layout.something or strings R.string.whatever. That's essential for the android development, so you better read some tutorials (or buy books) in order for you to get started.
So, in your case will be something like setImageDrawable(R.layout.wood); However, I highly recommend to read first a couple of tutorials. Google about it, you will find tons of them.

Categories

Resources