Android Responsive design using android studio - android-layout

Hi all !!
I'm newbie to android, Can i get any solutions to make my android app layout that fits in all screens.
If there is any tutorial on it, that would be appreciated !!
Thanks,

Create the following folders in res and add the xml in that
res/layout-small
res/layout-normal
res/layout-large
res/layout-xlarge
And open it from studio layout and make changes.
this link helps you.

The Android resource system gives you the tools to provide alternate resources based on the available width, height, or smallest width — important measurements that serve as the basis for choosing when to change our UI based on the space available.
Width and Breakpoints
Width is perhaps the most important dimension when it comes to choosing when to change your UI. This is because width is the basis for the breakpoint system.
A very good example is here

Related

Hide icons in Android Studio and set Layout zoom to be 25% by default

Is there a way to hide icons highlighted below in Android Studio? Also, is there a way to set layout Design view zoom to a specific value, say 25% by default. I did search the forum as usual but couldn't find specific answers. If there are already, would appreciate the link. Thank you.
Please note the second part of the image is rotated left by 90 degrees to minimize space. Android Studio 3.6.1 on Windows 7 Ultimate.
PS: I did try distraction free mode, even then some of these icons wouldn't go away.
Raised an enhancement request with Google, apparently they thought well of it. Seems its fixed per the tracker here. Hopefully it will roll out in next release.

Drawable icons for app

Recently, I've been working for some theming project for Android launchers. I need some guidance and advice from the people around here that could help me with this.
I have created one sample icon for Opera mobile with the size of 192x192. The question is, if I made that icon size as mentioned, should I create another size for it, e.g. 128x128? I'm a bit confused.
Thanks.
I am not sure if understand your question. If you add a drawable resource to Android Studio, it automatically resizes it to multiple sizes. If you have created one, that will be resized automatically.
Hope this helps.
If you want to design icons for android, you better design some for different resolutions. You have to make an icon for each. See at this article https://developer.android.com/guide/practices/screens_support.html#overview. There are the different densities and the multiplication factors.

windows 10 UWP UI design for mobile device

I am working on windows 10 mobile app. If I design an UI for 5' device, it doesn't look good on 5.2' device. Also on emulators of different screen size show messed up UI. Is there any work around this? Or do I have to design it for every screen size?
Usually, please avoid to have fixed Width/Height for your controls. With a Grid layout, you can set columns/rows and place your controls inside each cells. This is a first level to adapt properly your interface. In addition, UWP provides AdaptiveTriggers if you want to adapt the layout based on the screen resolution (cf. https://channel9.msdn.com/Series/A-Developers-Guide-to-Windows-10/07) for additional information. Last but not least, please check Design&UI documention on https://developer.microsoft.com/en-us/windows/design.
The trick is with UWP that you can design for every screensize at once. It's just a responsive design you use (either HTML/CSS or XAML). But you have to use the right controls and settings.
Some guidance on how to design for various sizes can be found at the MSDN design page.
To create a dynamic layout with XAML, see this article. There are various panel-types you can use to do the layout (see this article). But if you really want to build a responsive UI (or change it dramatically in various sizes) RelativePanel is your friend.

Why can't I size android components at will?

Okay, so I'm really trying to do a lab for a class thing and I don't get why I can't have a textbox that takes up the width of the phone and a button that takes up the width of the phone on the bottom, but I don't know why that is? Here's a picture of what I have.
I know this is a noob question but it hasn't been addressed yet on the online course I'm taking and I really need an answer because I wanted android development to be as easy as .NET on windows.
Well anyway here is one picture:
Also here is the other picture:
Notice if I try to make one element bigger, it leads to it pushing the other one out of the activity, I want to have one activity with both elements taking up the entire width of the phone.
Does anyone know what I'm doing wrong?
EDIT: I'm using Ubuntu 14.04 not Mac OS X.
Your controls are children of a LinearLayout with android:orientation="horizontal". This means that the parent ViewGroup is aligning them horizontally; you cannot get the children aligned vertically in this configuration.
If you change the attribute to android:orientation="vertical", you will achieve the result you're looking for.
I strongly suggest getting yourself familiar with the default set of layouts available in the Android SDK by reading this official guide.
Edit : Please refer to this answer for placing views at bottom of the screen.
When you use a android:orientation=horizontal orientation in the layout, the views are stacked/placed in a single row. Since both your views have their width set to fill the screen, only the first one is shown/seen.
What you want is the vertical orientation. This places the views in a single column, one below the other. The width set to fill-parent will allow you the view to occupy all available space.
Official documentation on views : Layouts : Android Dev Docs
Understanding Android Layouts : Techtopia
Android Layout Tutorials : Learn-Android

Help with application icons

I'm building a program in C++ (target is windows XP) using Visual Studio 2008 and I'm trying to add application icons, the ones that show up in the taskbar, explorer, desktop, etc. My .ico file has the sizes 48x48, 32x32, 24x24, and 16x16 pix in color depths 32-bit, 24-bit, 256 colors, and 16 colors. For what it's worth, I'm adding the .ico file to the binary in IcoFX.
I can get all the icons to show up like they should except for the one in the upper left corner of the program itself--the one that you can click on to bring up a menu with window size options--it still shows the default icon.
To get this little icon to change do I need a different image size or is there a completely different way of managing this one icon? Does that icon even have a specific name?
Thanks for your help.
Duplicated: How do I set the icon for my application in visual studio 2008?
According to one answer on that thread, you need to make sure that your icon is the first icon in the resources file.
Ok, I've figured it out:
I'm using wxWidgets as my GUI toolkit, so this is the only satisfactory answer I can give. wxWidgets has classes to set the main frame icons, those classes include wxIcon and wxIconBundle. Then wxTopLevelWindow::SetIcons can be used to set the application's icons. This sets ALL the icons (taskbar, main frame, alt-tab chooser, etc), no need to mess with a resource file in Visual Studio.

Resources