I'm looking for a system-wide graphic that (I think) is in android.R.drawable. I am looking for this one:
I realize that graphics differ between systems, however I am fairy sure that it is system wide because I have seen it in multiple programs.
I want to use the one Android provides so that my app looks good no matter what phone it runs on. Does anyone know where I can find that image to use in my program?
Taking a look at Android R Drawables, it seems it might be expander_ic_minimized.9
You can find those images in the Android SDK directory under
platforms/android-X/data/res/drawable-Ydpi
where X is the version code of Android and Y is the resolution (l/m/h). Most images are in the mdpi folder.
It is recommended to copy the images to your App, as the Android developers do not guarantee that all images will be there in future releases.
The image you are looking for looks like
expander_ic_minimized.9.png
Related
Since the new versions of Android Studio (Starting at 4.2 I think), I haven't been able to import images correctly. Let me explain what I mean by 'correctly'.
Before, importing an image of a high resolution (usually xxxhdpi) would automatically be converted to different sizes for lower resolutions (down to ldpi). Nowadays, all Android Studio seems to want to do is convert images to some grey rectangle and say "here you go, use that".
Now I don't think this is the desired behaviour which makes me believe that there is possibly some configuration to change or update that I have missed.
Below is the image I would like to import (with its resolution) and what Android Studio shows me:
Original: 832x456 image in PNG format
Android Studio import:
Can someone either explain if I'm doing something wrong or if this is the actual behaviour now ?
If this is the behaviour, my only option is to write a simple python script to generate the correct resolution versions based on the Android guidelines but I'd like to avoid this if at all possible.
Explanation:
I have created an application in which it's looking well in an android phone(480x320, such type of devices) and iPhone 7 plus and below. When I run my application into the tablet Nexus 7(nougat). It reduces the font size, Images and even height(which specify in the CSS) of my views.
In Android, we have different types of the drawable folder to easily manage multiple device support based on the values folder also.
Problem: How can I manage my application which will run on all the devices including phone and table in Android and iPhone and iPad in iOS?
Well you asked THE question. Looking through the react native elements library I found a function they call normalizeText, you can find it here:
https://github.com/react-native-training/react-native-elements/blob/master/src/helpers/normalizeText.js
Basically they take the pixel-ratio api, which docs you can find here:
https://facebook.github.io/react-native/docs/pixelratio.html
and depending on the screen size they multiply the values of with/height/font using that functions with values from 0.5 to 2. I found it a good solution to get a good visuals on every platform.
For the UI I would recommend you to use flex as much as you can, because it gets your app independent of width and height.
If you need some clarification feel free to comment.
i am suffering from last few days but i am not getting any perfect answer for that
android developer website
i
and apart from that i am also study lot of website but most of the website say's use dimen and used it for
small
normal
large
and x-large
but it is not giving me the perfect solution because most of the device which i am testing they all target normal dime such like that device start from 3.7 to 5 inch and because of that my card get moved up according to device i want the perfect appearance on each device there is a image attached to it
actually i want the perfect apperance on each device i found one method which is work fine to make a dimens xml according to the dimension of screen but it is not reliable i have to make more then 25 xml and if another device will come i have to make for these also this is image Url
If you want to support all devices then I think under my opinion You need make a check up on several points. These points are given below:
first you should make it sure that you are using right sizes in all drawable bucket. I am saying this because I think You are looking it perfect in some device but not looking good in other devices.
Do not make multiple xmls it is deprecated.
TO give margins for all devices you need to make different values folder or Dimens folder for different devices.
This is new way of supporting multiple devices , multiple xml is deprecated.
Here I am posting 2 links , this and this , check them out. I think that this is good for you to learn , just give it a try. And Up vote if this helps.
I have developed my app for tablet. Now I need to convert it to run on phones. What changes to I need to make? Are there any particular steps I need to follow? I tried deploying the app as-is on the phone emulator, but stuff appeared to be cut off.
You've asked a general question, so the best I can do is give you a general answer. The steps and procedures outline here should be just what you're looking for. In a very general sense, you're simply going to want to have different layouts for different screens sizes. Android makes this very easy to do with their resource "buckets".
Working with both app distributions services (android market and Apple App store) I have discovered a mystery.
The file size of an app is in general larger for an Apple app than for a Android app.
I can't seem to find any explanation for the differences, and it seems to be an untouched subject.
I have tried allot of different apps and the difference seems to vary between a couple of MB to 6-8 MB. So the question is, how come the file size is larger for Apple apps? What is the extra MB used for?
Examples:
BBC:
Android: 918K - https://market.android.com/details?id=bbc.mobile.news.ww
Apple: 6.7 MB - http://itunes.apple.com/dk/app/bbc-news/id364147881?mt=8
Due to some spam prevention, I'm unable to link directly to the rest.
British Airways
Android: 1.2 MB
Apple: 7.9 MB
Northern Bank
Android: 2.1 MB
Apple: 6.4 MB
Bank of America
Android: 727K
Apple: 2.1 MB
I could go on... If anyone can provide a statistics of file size for the two app distributions, confirming or disproving my theory. - I would appreciate it allot.
I have just spent the last day or so trying to track this exact problem down. I have built a little game called BlockIT for Android, and now I have a running version for iOS. The extremely odd thing is that the Android version is 8.2 MB and the iOS version is 14.1 MB.
Now, since I am the owner of the source, I wanted to track this down and find out why. As many suggest here that it is the graphical elements - this is not the case. The entire data set (non code) was almost identical in each package. Which makes sense since I am using the same graphics in each application.
So, why is the code build so much different! My iOS code build was nearly 7 MB and the Android one was less than 3 MB. The code itself was written to run identically and all but small portions of code are exactly the same on each platform. What I found was that the build (iOS gcc) settings had massive effects on what size of output you get. If you set only to target ARM6 or ARM7 then the size of my code binary dropped from 7 MB to 5 MB. This indicates there are almost complete duplicates of functions and libraries for each target in the one binary! Additionally, the built-in debugging symbols dont seem to get entirely stripped. Finally, the encryption of the code also costs large amounts. This is probably the most puzzling, since Android signs their apk's in a similar fashion. It seems that the iOS signing is done very oddly.
So, I hope that helps. To reiterate:
- Images / Data don't seem to be the problem
- Code building on iOS generates multiple platform output in the one binary == lots of extra code (btw I dont wee why Apple does this - seems odd).
- Code encryption is not very size friendly on iOS.
There's no real way to fix the actual problem (again, odd and disappointing).
The binary executable in an iOS app is encrypted, and thus compresses very poorly or not at all. The binary executable in an iOS app is compiled with some library code statically linked, which can often make it larger than interpreted Dalvik byte code for similar stuff. iPhone apps tend to contain more high quality graphics content and artwork for multiple screen resolutions including the relatively large iPad display.
For a universal app in iPhone we need to put three size of images -
one for 320x480 px
second for 640x940 px (retina)
third for 768x1024 (iPad)
where as while developing a android application we need to put three kind of images -
hdpi (high)
mdpi (medium)
ldpi (low)
one more thing here in android there is no compulsory rule to put all three kind of images. Basically it depends on for which target you are making app , only for those resolution we need to put images.
In my opinion, Apple Developers are using more full-screen size Images (in low def and Retina), and much more images than Android, and UI definitions files for iPhone (.XIB) are much bigger than XML files used in Android. There also should be a difference of Compression in packaging (.APK) is so hugely compressed ! And Finally maybe a difference in Including frameworks, but on this point I have no clue :)