Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Is there a difference between developing for a smartphone vs for a tablet? i.e. iPhone vs iPad, Android vs Android Tablet. What are the main differences to take into account? I know its a broad question, but trying to wrap my head around the difference.
Edit:
If a company can develop for iPhone apps, does that mean that the company could easily develop for iPad as well? Do companies specialize in iOS smartphones and not iOS tablets?
The main difference is screen size. Sounds like an open door, but if you actually write apps targetted at both phones and tablets, the differences become very clear.
Take sending an email from your app. On iPhone you get a nice full-screen mailer. On iPad, full screen would be too much of it, so you need to embed it in a smaller overlay.
Take scanning a QR code. On iPhone your screen is just the right size for such a thing. An iPad is just a little too big.
Take having a "More..." menu. On iPhone, having 4 rows saying "About", "Settings", etc is a good design. Having the same 4 rows full screen on iPad looks really, really bad.
For iPhone/iPad in the examples above, you can read Android Phone vs Android Tablet of course.
On the low level OS side, there is no real difference. It's the same OS.
One of the best answers is from what you'll find on developer.android.com
Each screen size offers different possibilities and challenges for
user interaction, so in order to truly satisfy and impress your users,
your application must go beyond merely supporting multiple screens: it
must optimize the user experience for each screen configuration.
Usually the programming is the same the only change is layout and maybe a few extra buttons or less buttons.
UI design is the main difference. Tablets have more screen space. In most form/control-based apps (as opposed to games), this makes you redraw pretty much the whole app layout for tablets.
Related
This question already has answers here:
how to resize physical android screen from terminal/shell
(3 answers)
Closed 9 years ago.
I'm thinking of purchasing an Android tablet for development. But I plan on developing both phone and tablet apps. I know that they technically both run they might just look different because of resolution differences.
My question is can I change the screen dimensions of a tablet to have the same screen size as a phone? Not really so much changing the resolution (so it would still take the whole screen), but more cutting of the edges so that the actual screen dimensions are that of a typical phone.
If you do not want to purchase a tablet, you can still test your applications using AVDs.
I haven't, however, ever heard of a way to change the screen dimensions of the tablet without actually slicing it through with a chainsaw :) If there are any ways I would be really interested in knowing!
play.google Here is an app by which you can change the density and other root properties of your phone. All the build properties can be edit by this if you have root permission of the device.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm not sure if such question is suitable for Stack Overflow because it doesn't include code but since "Stack Overflow is a question and answer site for professional and enthusiast programmers" I bet that many programmers are wondering exactly this and some (like me) know nothing about Android devices but are forced to prepare a website for that platform.
So, the question would be: what Android device, in reasonable price range, is best for web development? It's a pity that their simulator is buggy and too slow on Windows machines. Up to date device seems to be a good time-saver.
I have one HTC Wildfire ( for bad small screens ) , had one HTC Desire (bravo) but I broke it :( , one HTC Desire HD for Good screen and single-core cpu and now I bought a used HTC One S which is a dual-core high res phone. I also have one 7 inch cheap Chinese tablet which is good only for testing.
In general , your apps should be working good in low-end devices, like htc wildfire, samsung galaxy mini/ace. If your performance is acceptable in these devices, then your app will be very good in top-end devices ( like HTC One .., Samsung galaxy s3 etc).
The problem comes when you want to see how the GUI looks like in different screens. So in my case I have one phone with very small screen , one with a good resolution and one with high resolution. Most modern devices are covered in these cases, the rest you can see how they will look when creating the layout xml in eclipse and viewing the result ( no need to open the emulator , except for dynamic data ). When viewing how the xml will look like, eclipse give you the ability to display it in many different screens ( or even custom sized ones ).
I wanted to post this as a comment to your question, but I don't have enough internet points for that.
I just want to address one part of your comment: "It's a pity that their simulator is buggy and too slow on Windows machines." I had the same sentiment (It'd take me around five seconds to step from one line of code to another), until I installed the x86 emulator. Suddenly, the operation was blazingly fast. This is largely because the x86 emulator is able to use the CPU's VM acceleration.
Take a look at the documentation if interested.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have a task to convert an iPad application into Android tablet.
I get into my concerns right away.
iPad screen resolution and size is only 2 different versions, so you design in the small resolution and add graphics for the bigger one too. That's fine in Android you have the drawable folders. But when you testing in emulator shouldn't I set the resolution iPad like? 1024x748 and test my app there? OK I will have my values with dp,sp, wrap content, fill parent, but my target devices are tablets. What would your opinion be in setting up the emulator for such kind of task?
Next is what about some things with architecture. In the iPad I have views and subviews, child controllers appearing "on top" of the other controller. This can happen with fragments I think so far but, can these fragment layouts have a dimension? or you are just hanging on wrap content etc? I mean you have a view 1024x748 and another view appearing top of it bottom right on the screen 300x300 for example. Different controllers, different views, exchanging data! Any example tutorials on such a design?
Can I just show a "popup" kind with various views inside in a specific position on screen? Like you push a button and a view rectangle with a pointing arrow appears next to it.
Thank you in advance and I hope you can understand what I'm asking. Comment for any inconsistency.
What's your question here? You have to create a similar App on Android as you have now on iOS. The two platforms are different, both in API and in UI terms. Thus, first of all, you/or a designer at your cmpny have to redesign the app, so it fits into the Android world... So in other words, what matters here is "WHAT YOU DO", not "HOW YOU DO"... You have to design the same experience for your Android users... And that does not start with simply porting your app, and coding.
You should NOT simply take features form the iPad app, and directly force them into the Android version, as the look&feel, the behavior of the two systems is different. You should dig deep into Android Design Guides before starting that... HERE and HERE
E.g.: In the iPhone world you can use absolute positioning, as you have only a few valid resolutions. In the case of Android, layout has to be dynamic, as you have tons of different resolutions. The recommended layout of programs, the number of hw buttons, these are different. The user expectations are different. An Android phone is operated differently from an iOS based device... Users are expecting functions to be accessible in different ways...
Another approach is to use a framework that enables designing apps for every different platform. Thus, they have an abstraction layer on top of which (with it constraints) you design your app, and than you are able to release it to all of the different platforms (iOS, Android, WP7, W8, Bada, etc, what the actual platform supports..). HERE is an article on such platforms.
I'll give it a try to make something meaningful out of this.
To the emulator screen size
Android come in any size and shape so you should develop for that. Sometimes it can be an advantage to actually set the dimensions in the emulator to something obscure just to see if it looks good. That said I'd test on the most popular tablet brands like:
Nexus 7, Asus transformer eee pad (1280×800)
Nexus 10 (2560×1600) (hard to test due to the large size)
Amazon Kindle Fire HD (1280 × 800) (same as nexus but some report indicate it is handled differently, so if you got a physical one test it)
In general you should always test on a multitude of screen sizes but also a multitude of devices as there always is some differences you don't think about (like with the amazon kindle fire HD), so get your hands on as many tablets as you can or use some kind of test service.
About architecture
Android has views and sub views as well. Fragments is a simple combination of code and view and like views have a size. Fragments can easily exchange data but it happens through its parent activity.
You don't EVER want to position different views at a specific position on the screen. Setting UI for android is more like setting UI for a webpage than for a newspaper. You don't have a specific size but a size that various for each device. So you should make a layout that can be stretched to the various sizes and still look good. This can be accomplished in numerous ways.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to support different screen size in android
So im making an android app that i want to support both tablet and mobile phone screen sizes i tried using the supports-Screen method but when i type in support xlarge screens gives me an error.
Does anyone know how i could do this?
Thanks
You can check the src code for the last Google IO application, it support tablets and phone. And has several useful code snippets and design patterns.
IOsched
Hope this helps you :)
Supporting multiple screen sizes in Android can be tricky at first, but http://developer.android.com/guide/practices/screens_support.html will be your best friend.
As a beginner (I'm assuming you are a beginner) you must first create a default layout, then in Android you can begin adjusting your layout for tablets and such. A video that helped me immensely was this video from Google I/O last year. Deffinitely worth your time to watch the whole thing.
http://www.youtube.com/watch?v=Oq05KqjXTvs&feature=player_embedded
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to develop an application for Galaxy Tab and Android phones. The tab and phone UI are very different. Like in tab, we have used fragments, etc. and on the phone we want to use tabs.
I am aware that by using layout-small or layout-large I can show different UIs, but what about functionality?
How should I proceed? Is there a simple way to handle functionality also for different screens? Or is it better to create two applications finally?
First be sure to read this recent blog post that gives an overview of how applications see different screen sizes and can adjust to them:
http://android-developers.blogspot.com/2011/07/new-tools-for-managing-screen-sizes.html
This post has some examples of basic adjustments -- providing different layout files for different screen sizes.
This is also something that the fragment APIs are intended to help with. If you are already writing your UI with fragments, you are most of the way there -- showing these in tabs does not require a totally different implementation, just use the fragments to populate the different tabs.
If you are targeting Android 3.0 or later, this is easy because the action bar already has simple mechanisms to have its tabs allow switching between fragments. This API demo provides a very simple example of its use:
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/ActionBarTabs.html
If you want to run on older versions of the platform, that is what the fragment APIs in the v4 support library are for. These allow you to write your app using fragments and still be able to run all the way down to Android 1.6 (API 4) of the platform. In MR2 we also added some sample code showing how you can use the support lib fragments with the old tab API.
Sample code for this is included in the now deprecated TabActivity class:
http://developer.android.com/reference/android/app/TabActivity.html
There's no single answer to this - it's a broad topic.
One thing to keep in mind before you start, is that there's currently a lot of code floating around the web that assumes you can judge a screen size by the platform version: IE, everything up to Gingerbread is a phone, and Honeycomb (and up) is a tablet. This is a bad idea. Don't do this :) Also try to avoid a massive switch case that just executes different blocks of code based on width/height values you pull from the system. I'm not going to describe how to do that, others have already given that answer.
One thing to investigate is the Android Compatibility Package - It lets you use Fragments and Loaders (which were introduced in Honeycomb) in earlier versions of the Android platform. One common pattern this enables is to let you set up a nav fragment & content fragment which sit side-by-side on a Tablet (where there's room) but have the nav fragment switch over to the content fragment when an item is selected on a phone or smaller screen.
If you're just trying to have images that grow and shrink with screen size (that you're not drawing programmatically), the answer is 9-patches.
You also have the option, if it's appropriate for your application, of using Android Market's Multiple APK support. The linked page dives into how to set that up, and gives you a pretty solid description of when to use it and when you're better off with a single APK.
You can retrieve the screen size using:
Display display = getWindowManager().getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
You will have to have decided which screen sizes are required for the different features, such as setting the minimum tablet height and width to min_tab_height and min_tab_width, accordingly. Then do a check for if this screen size qualifies:
boolean is_tablet = false;
if (width >= min_tab_width && height >= min_tab_height) {
is_tablet = true;
}
Now you can check if (is_tablet) before allowing tablet functionality to your app (or if (!is_tablet) for non-tablet functionality.
Try splitting your app in seperate parts, one trunk containing core features that you develop as a Library, then two separate apps using the same core functionality with specific UI design, one for Tablet version of Android (>3.0 HoneyComb) and one for "phone" versions (<3.0).
My experience with GalaxyTab-likes (basically a tablet with a 'phone' non-HoneyComb version of the OS) is that phone layouts do stretch nicely to fit the 7 inch screen. So it might be enough to add a specialized layout.xml specifically made for big screen. However I didn't even found it necessary on my own app...
EDIT:
also not that if a tablet is running a non-honeycomb OS, 2.2 or 2.3, like is the case with GalaxyTab and many 7 inch tablets, the functionality is exactly the same as on phones, so no specific redesign is needed if not for the layout of UI components.
EDIT:
read this page for specific and detailed information on how to support different screen size in your app. You can specify in your manifest the size of the supported screen for your app with
<manifest ... >
<supports-screens android:requiresSmallestWidthDp="600" />
...
</manifest>
So given the market now supports uploading several apk for the same app, you could compile different version of the app seperately for each screen size, and the market would filter them out according to the sizes in Manifest, so you should even never have to actually check for screen size in your code.