Android :: Possible Using Xml File Without Changing Sizes Manually?
Sep 28, 2010
For my design i have in the xml file something like:
The design is like a row that have two cells. I want one of them to be autosize and fill the row and one of them to have fixez size. I want that the second linearlayout to wrapp its content and the first one to fill the rest of the space.
Something like in css having two divs floating left and one having fixed size and one filling the rest of the row.
Is something like that possible using the xml file without changing the sizes manually?
View 1 Replies
Dec 14, 2013
A lot was made of Android 4.4 KitKat having a smaller file size than previous versions of Android. But for whatever reason I can find no mention of those actual file sizes, not even KitKat. How to know the file size of each version of Android?
View 2 Replies
View Related
Apr 15, 2010
I have an image on a private file.
I read the file, create the drawable, and assign it to an ImageView.
The ImageView has WRAP_CONTENT so the size is automatic.
On 320x480 screens, the image looks good
But on screens with more resolution and high density 480x800 or 480x854 (N1, droid) , when the image is for example 150x150, I see the image as 100x100.
Of course it has something to do with the density but not sure how should I resolve this.
This is my code...
if I then inspect the size of the icon, android thinks the size is 100x100, when really is 150x150.
Looks like its reducing the image by the density.
Can anybody explain this and how to avoid this.
View 1 Replies
View Related
Apr 22, 2010
I've been reviewing the Supporting Multiple Screens documentation on the Android and I just need some additional clarification...
It's my understanding that designing three unique interfaces (ldpi, mdpi, and hdpi) would be the best way to go about supporting all the potential android screens with minimal scaling/distortion.
Yes, I know there are similar questions posted, however... If I create an image for the benchmark mdpi (let's say my image is 300x210, just for example) how to I determine what size I will need to recreate that image at ldpi & hdpi? This post as well as a google search leads me to believe that ldpi is just 75% of the mdpi image, and the hdpi is 150% of the mdpi image. Is this accurate?
View 1 Replies
View Related
Aug 21, 2010
How do I manually add a file to an Android APK package?
View 1 Replies
View Related
Nov 10, 2010
Friends, My application has to get current gps position in every seconds and write this data as byte array to a file in files directory. To check the data in that file I tried to open mnually. But i couldn't open. How can i read the file. The file is a text file
View 1 Replies
View Related
Sep 9, 2010
I have an application where I would like the users to be able to change the theme. Currently my layout have elements like this: <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/background_transparency"> what I would like to do is to change to a new colors.xml that has a different value for "@color/background_transparency" if the user selects one of the themes available. Alternatively to be able to change the value of "@color/background_transparency" in code.Is this possible? Or am I doing this the wrong way.
View 3 Replies
View Related
Oct 11, 2012
I have a couple of FLV format movies on my phone that play fine with the MX Player video app. The problem is, they are not associated with the player. For some reason, they were auto associated with ZA Archiver (winzip type app), so clicking on the vids in my file explorer triggers that app instead. Plus it opens to ZA's browser, meaning I'd have to browse to the vids again to try and open. At that point, ZA then asks what program I want to open them with. Clearing data on ZA didnt' work (How I thought you could remove file type associations), and uninstalling it removed all associations with the movies. It then just gives me an error that the files cannot be opened.
Is there any way I can force FLV's to always open in MX Player? I know I could use MX's built in browser to get to them as well, but just a personal preference thing that I want to use the stock file explorer.
View 8 Replies
View Related
May 3, 2010
I have the VanillaDroid ROM installed on 2.1 v2. My phone is rooted. But I don't like the boot animation that came with the ROM, so I decided to change it. In every tutorial I've seen, people mention a "bootanimation.zip". However, I can't find it anywhere on the phone. But I did find the "bootscreen" folder in "/system/media/" with the bootup animations in it. I assumed that if I swap out the animations for the new ones, it would work (reasonable enough right?). Not really. Apparently, I deleted everything in the bootscreen folder, but when I try copying stuff into it from the memory card, it can't find any directory on the memory card through the "adb shell" stuff.
I know the folder with the bootscreen animations and stuff exists on the memory card, but apparently the shell commands say it doesn't exist. So now my phone boots up with no animation or sound. Its nice to have a quiet boot, and it does seem to start up a little faster, but I want a boot screen again. I know if I reflashed the ROM, it would come back (or at least should). But I don't want to have to reset and redownload all my apps and stuff, especially since I have just got everything the way I want. Is there anyway to get the bootup animations back without reflashing? And if I would reflash, since its the same ROM, would I need to do a factory reset?
View 5 Replies
View Related
Jul 20, 2013
just changed my rom to 10.1 cm, but even that i changed my ringtone to a different one from my sdcard, and it is saving my choice - when someone calls me - it doesn't play that song.if i change it to the deafault ringtones of the device - it changes, but not with my music files.
View 3 Replies
View Related
Mar 20, 2010
I am new to this phone and so far so good.Working things out and getting it set up like I want it. I have two photograph widgets on one of my screens, one set up for newly taken pictures and one set up for newly shot video. The only problem is, I don't know how to change the default video save location. I am using the astro file manager and have seen that all videos and pictures save into a file named DCIM on my SD card. How do I change this to make it save pictures and videos into different files?I have made a different file for my videos and manually moved them into the folder but the phone is still saving new videos to the same old default place.
View 4 Replies
View Related
Nov 13, 2009
I've got a quick question about screen size support. Currently, I've got an application that is rockin' along just fine on 1.5 and 1.6. Today the client called and says they want to run on Droid. While I've downloaded the 2.0 SDK, I'm a little wary of compiling against it. Will it break 1.5 and 1.6 compatilbility? How will the "medium" phones (G1, MyTouch) know to use those layouts?
View 3 Replies
View Related
Oct 15, 2010
I want to develop an application for a tablet of 480*800 screen pixels. I had developed an application for normal mobiles, but now this screen size is large than normal size. what precaution should I take while developing the application? Because device is not available right now so I must have to work on the project using emulator.
View 2 Replies
View Related
Aug 25, 2009
G1, Dream, Magic, Hero, Galaxy and more to come... Does anybody have a rundown of their screen sizes (and of some of the devices to come out)?
View 2 Replies
View Related
Nov 29, 2009
Hello, I would like to ask what settings are necessary for my application to be available on all screen sizes: Is it enough to compile it using SDK 1.6 (but target is set to 1.5 and API level to 3) or maybe I have to set target to 1.6 and API level to 4?
View 4 Replies
View Related
Apr 27, 2010
supporting multiple screens (sizes and resolutions). I´ve searched not only this forum but many different websites and the android documentation but I´m probably doing a small mistake so things are not working properly.
Well, my main layout was designed with a HVGA screen, and it works great. When I try the same app on a WVGA, FWVGA, WQVGA or FWQVGA, I always get an unused space in the end of the layout because the screen ´s "heightnes" is proportionally bigger than HVGA´s.
So I consulted the documentation and decided to give a try on resource qualifiers, so I then created a nonsense UI and placed it on layout- large, created a new AVD using the WVGA skin and launched the app. Well, all I got was my old and not well stretched layout. The same happened to a FWVGA AVD.
This is the first problem. The second is: medium high density medium size screens and medium density large screens have the same resolution: how can I create a layout that is loaded for both, but not for (for example) medium size medium density or small size medium density screens?
View 10 Replies
View Related
Aug 24, 2010
I have a widget in my app (in single choice mode) and the list is longer than the screen so it requires scrolling. There is a lot of space above and below the text so I think that space could be reduced (and the font size) so that everything fit without scrolling. I haven't been able to figure out how to reduce that space.
I'm also trying to get a single checkbox below that list and i tried making 2 listviews on top of each other on the linear layout but it didn't work.
View 2 Replies
View Related
May 10, 2010
I want to make the edittext width the same size as button. My EditText is currently very small. I use relative layout.
<TextView
android:id="@+id/aha4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="17dip"
android:text="Vzdevek:"..............
View 4 Replies
View Related
Jul 31, 2010
What I'm trying to do is have a clock widget of different sizes (i.e. 2x2, 3x3, 4x4 etc) in one apk and a configuration activity to be able to select which size to add. From what I've learned from documentation:
Widget size is specified in <appwidget-provider> tag in respective xml file
Also in that file I set up the configuration activity for that provider
So it seems that size is a property of AppWidgetProvider and I'll need to somehow create another provider from the code in configuration Activity of the first one. I have read this and this. First one explains how to put multiple wigets in one apk, but it's not clear how to select between them in runtime. Second one is about changing layouts, but not size.
View 2 Replies
View Related
Mar 18, 2010
I'd like to use different row descriptors (from the XML layout resource) in one ListView. Can I and how? Also, I'd like to be able to programmatically change the size of the rows, based on the data in each row, in a ListView. Can I and how?
View 1 Replies
View Related
Sep 17, 2010
I'm making an Android AppWidget to sit on the home screen.
The user's home screen space is precious, so I want the widget to be small. The ideal size would be 2x1 cells.
Some documentation suggests you can have any size you like?
But the AppWidget graphical design guidelines imply that only standard sizes are supported: 4x1, 3x3, 2x2.
Does that refer to the available PhotoShop templates or is it a limitation of Android itself?
I'm finding that a 2x1 widget works on my actual device (HTC Wildfire) but expands to 2x2 on the emulator.
HTC have their own special implementation of the home screen, so maybe my widget will only work at 2x1 on HTC devices?
Is there any way to create a 2x1 widget, or should I use a standard size?
My widget was adapted from the Simple Wiktionary sample.
The manifest has android:minWidth="146dip" and android:minHeight="72dip".
There's a RelativeLayout with android:layout_width="fill_parent" and android:layout_height="wrap_content"
I'm just starting with Android, so apologies in advance if this is a silly question. :)
View 1 Replies
View Related
May 27, 2010
I am trying to find the number of rectangles per sec in three different size rectangles. I did find it though. But the only problem is that I see all the rectangles after it ran the program completely. But I would like to have rectangles drawn, when I call canvas.drawRect(rec1,paint); function.
I am also looking to keep the old rectangles on the screen while new ones are drawn. I tried with lots of different options nothing worked. To display the rectangles. Can anybody show me the direction to which way to go?
package com.Benchmark.Rectangle; import java.util.TimerTask; import android.R.anim; import android.app.Activity; import android.app.AlertDialog; import android.graphics.drawable.shapes.*; import android.os.Bundle; import android.content.Context; import android.graphics.*; import android.view.View; import android.view.animation.Animation; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; Code...
View 4 Replies
View Related
Mar 28, 2010
I have read the documentation on "supporting multiple screens" but can't seem to figure it out. I mean, i understand that resolution effects it but it just doesn't make sense to me that the droid and the T-Mobile G1 both use the regular "layout" directory. I developed the app on a droid and got everything to work but there is one view that i need to use hard-coded pixels.....which im using dpi. Now when installing the app on the G1 things on that view are getting cut off because the G1 has a much smaller screen. If I redo it to work on the G1 then everything is all squished together on the droid and even tho everything is visible this way, it looks silly.
I tried using the different attributes in my manifest but that didn't help but since i'm using minSDK as 4, the support different screen size attributes are true by default anyway.
Am i missing something very simple and obvious or is it just the way it is?? Isn't the physical screen size of the G1 like an 1" smaller?? I'm still kinda new to Android development so forgive me if i am missing something simple.
View 3 Replies
View Related
Dec 16, 2009
I have created layout-large and testing against android 2.0.1 WVGA. however, its picking layout-normal. Can anybody suggest me what I am doing wrong. Even though, I have 3 layouts ( layout-normal, layout-large, layout- small), Its always picking layout-normal. why its so.
I added properties to manifest file
CODE:.............
View 2 Replies
View Related
Jul 1, 2010
I'm currently developing my first android app, and my first game. I've been developing on a netbook with a CliqXT (HVGA). Things are going well, it renders perfectly on the smaller screen. I knew I'd have some issues when rendering on larger screens, but the issues I'm having are not what I was expecting and I'm kind of stuck.
So basically the game consists of a main SurfaceView which I'm rendering the tiled game world on to. I followed this tutorial to get started, and my structure is still pretty similar except that it calculates the boundries based on the player location:
http://www.droidnova.com/create-a-scrollable-map-with-cells-part-i,654.html
The game also has various buildings the player can enter. Upon entering it launches another activity for that particular building. The building activities are just normal Views with Android UI stuff defined in XML (Buttons, TextViews, etc).
What I expected to happen:
So I expected the the building UIs to render correctly on the larger screen. I specified all dimensions in "dp" and fonts in "sp" in hopes that they'd scale correctly. I expected the actual game tilemap to render generally correctly, but maybe be really tiny due to the higher resolution / dpi. I'm using a very similar function to the tutorial linked above (calculateLoopBorders(), my version is pasted below) to calculate how many tiles to render based on screen height and width (getHeight() and getWidth()).
What is actually happening:
The whole game is just being rendered as if it's HVGA. The tilemap, and the building UIs are just scaled down to the smaller screen size, leaving black borders around the left, right, and bottom (see images).
View 2 Replies
View Related
Dec 7, 2009
I have noticed that when I install some widgets I can later choose from different widget sizes while adding widget. How can I implement that feature in my widget?
View 2 Replies
View Related
Oct 19, 2010
Is there a way to use an image size when setting the sizes of a view? I want to create a TextView item with the exact height of a resource image, but I don't want to use the image as a background for the text view.
View 1 Replies
View Related
Sep 17, 2010
I am using some drawable objects, when I instance them and paint in my canvas they doesn't get the original PNG image file size, instead they get a bigger size, so they does't paint in my canvas as I expected since I wanted them in their original sizes, why this happens?
(original file is 96x96 pixels)
mSprite = mRes.getDrawable(R.drawable.my_sprite);
mSpriteWidth = mSprite.getIntrinsicWidth();
// It returns 114, not 96 mSpriteHeight = mSprite.getIntrinsicHeight();
// It returns 114, not 96
mSprite.setBounds(coordX, coordY, coordX + mSpriteWidth, coordY + mSpriteHeight); mSprite_PipeRect.draw(canvas); //It paints at 114x114 size, it shows bigger in the screen then original size.
Something similar happens with the background but it is fixed in the "setSurfaceSize" event this way:
public void setSurfaceSize(int width, int height) {
mBackgroundImage = Bitmap.createScaledBitmap(mBackgroundImage, width, height, true);
}
View 3 Replies
View Related
Aug 9, 2010
I'm currently implementing some image processing code for Android. I'm aware of the memory limits and am happy to code within them. However, I cannot find any documentation that lets me work out how many bytes are used for each instance of a given class that I might want to instantiate (on the heap). I'm an experienced C++ programmer and so am relatively competent at working out such struct/class sizing issues for my C++ code (taking into account processor data path width, platform alignment issues etc). I know that Java in general is at a higher level of abstraction and so that I may not be able to guarantee particular memory usage for a general Java VM. However given that android is running on a different VM, and given that developers are strongly memory constrained: I'm assuming that there may be a relatively deterministic set of rules for working out how big a given object instance will be, given knowledge of the members.
View 2 Replies
View Related
Aug 12, 2010
With the many devices available, each with different screen density and resolution, I am wondering - how many versions of an image should I make for the different device screen sizes? Is it 3? small, medium, large or just 1.
View 4 Replies
View Related