Change Android App Theme Permanently - android

I am making an app in Android Studio. I want to make the app full screen. I would change the theme using the button in the application, but if I change the phone or refresh the app, it would change back. Please help!

I think you're trying 'Design preview in Android studio'.
In 'Design' tab (where you're in right now), you can just see how it would look like in different phones and Android SDK versions.
If you want to change the App theme permanently,
Go to res/values/styles.xml and custom your own theme -ex) 'AppTheme'
In AndroidManifest.xml, you can set it via namespace 'theme' like this android:theme="#style/AppTheme"

Related

button color not changing android studio 1.5.1

I’m unable to change the color of button in android studio. When I edit the .xml file, then in preview it looks exactly like what I want.
But when I build the code and run it in my phone, then it has no effect.
Also button color is different than usual in mobile
Check if you have not more xml files of same name or you may be doing changes in landscape xml file
The emulator can be very finnicky depending on what version and device and hardware you have. Make sure that the theme you are using in the preview window in android studio is also set as the theme in the androidmanifest.xml file. If you want to know for sure what your app will look like, build the apk and put it on your phone.
I hope some of this info helps
Happy coding!

Strange icon issue in Android Studio

So, I have developed the first build of my own android flashlight application and I want to distribute it, but the problem is following;
I have created appropriate icon for the application and they all are scaled in the right way too using romannurik.github.io, the icons have been placed, I assume, in the correct way - I browsed to the project directory and replaced all sample icons (stock icons) with my own icons. Now, I have tried rebuilding and cleaning the project, yet nothing helps it.
In Android Studio, under mipmap folder, all icons are located, here is how the folder including pictures looks like
And by clicking on those .png's, I see the icon the application should have, but after I launch it on my phone, it still has the stock icon. Even setting build type to release, it still does the same. I also tried to relaunch the Android Studio and still nothing does it.
Some help? Thanks!
The icon is setted in the AndroidManifest.
<application
android:icon="#mipmap/ic_launcher"
Are you sure that you do not have this?
android:icon="#drawable/ic_launcher"
UPDATE
As you can see from the comments on this post, the user has a malformerd AndroidManifest screenshot manifest
There is a nested application tag with ther android icon property.
You should set application icon in your manifest

Android Studio: app theme different in preview, running device and styles.xml

I'm trying to change the theme of an app that I'm trying to develop using Android Studio. Apparently, there are at least two ways to do so: by editing the styles.xml file and by using the button above the preview (for me it's the middle button stating the name of the selected theme).
What I'm witnessing is this: When I try to change the theme by using the button, it will update the preview. When I edit the styles.xml file, neither the button caption nor the preview change. And when I run the application, neither the theme chosen using the button nor the theme specified in the styles.xml file are used.
So for example, I have chosen "Material Dark" using the button and specified Holo Light in styles.xml like so without the two interfering with each other at all:
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
And then, when I finally run the app in an emulator, I don't even know the theme (light gray action bar, black text color) that it displays the app in but it's not one that I have specified.
That being said, (almost) every other change I apply to the app in any way using Android Studio is displayed just fine both in the preview and in the emulator. An exception to that rule is the changing of the text color of the elements through the activity's XML file...
I'd appreciate any help, since I'm at my wit's end and also somewhat new to the whole thing.
Thanks! - koala
This is because ide sees no emulator. Emulator always run, but ide could hang up in state "Waiting for target device to come online".
Possible reason - Android API versions mismatch. Check if minSdkVersion and targetSdkVersion in Gradle Scripts - build.gradle (Module: app) correspond device API (also Synch push Synch Project with Gradle Files on a panel). Also low versions (e.g. API 15) result in ide-emulator link failure, inspite of application and device versions match.

Android Widget Look and Feel Different When Running

I am using Eclipse ADT to develop my first Android application.
In Eclipse you can change the theme using the menu shown in the Graphical Layout window. I decided to use the Black theme because I like the way the UI components look using that theme.
One of my UI widgets is a seek bar. Here is how it looks using the Black theme:
When I test (run) my application using the Nexus S virtual device the seek bar looks different:
Why do they look different? (I am guessing that Eclipse is just showing me a preview of what that theme would look like and not actually setting it anywhere and that when I run my app it inherits the theme from the target platform.) Is there a way I can force the look and feel of my app?
Thank you.
Because the Android UI has evolved and changed. The first image you posted is Android 2.2 (ish) and then the second image looks like Android >= 4.0.
Secondly, AFAIK, changing the theme from that menu is ONLY for checking out the apps UI within the GUI layout editor - it will not change the theme on launch within the emulator, or a real device. For that you need to specify the theme within your manifest.
You can change the version of Android being used in the preview too, using the Android icon on the far right of the GUI editor. You can also preview more than one at a time using the far left icon on the same toolbar.
What Rawkode said.
I'll add my two cents:
You can take a look at the HoloEverywhere project if you want to have a consistantly looking application across all Android versions.
The project is essentially a backport of the Holo theme for Android pre 4.0.
You can check it out here:
http://www.holoeverywhere.com/

What theme does the Xamarin designer for Mono for Android use?

When using the designer for Mono for Android in Visual Studio,
the controls have a nice clean design but as soon as you run the app on a device (emulator or real)the controls have a completely different style:
Is this because the designer uses a specific theme, if so which one,
or is there something else I have to do to get the same style on the device as in the designer?
You probably have the default theme set to Theme.Holo.Light in the designer. In the upper-right of the designer, you will see a button that allows you to select the theme. See the screenshot below.
If you need to change the theme to Holo light or just Holo, reference this post. You will need to make some themes resources and update your application manifest.
This normally happens when your Target Framework is set to Automatic - it will drop down the lowest theme it can use, you will want to change that to API 14/15 to pick up the "Halo" theme from within Android

Categories

Resources