Android Studio Theme rendering problems - java

This is the image with the problem
http://imgur.com/uUd3its
I have tried solutions in other posts and I still get this rendering Problems with all themes in Android Studio.

Its quite popular issue with novice.
There are many possibilities of failure to not render UI layouts.
First and foremost solution is to resolve by going with Android Studio's default recommendations.
If it still fails to resolve then need to go for manual solution.
(1.) Incompatible API support Issue :
-- Ref to same snapshot, there is little droid icon with number 23(in your case). This represents the latest supporting API. You may select lower API no than current number (i.e. 22, 21, etc.) and then let system render the UI layout. If its success then you may again update with latest API number (i.e. 23)
2.) There could be possibilities of inappropriate reference to related activity java file/other resources.
If you submit all code then one would be able to give specific solution to your problem.
Cheers!
**
UPDATE 1 :
**
If require try these solutions too.
-> As this is not a syntax error; means you can run the app. After launched app on simulator/handset; come back to design xml file and check for rendering issue. It has worked many times to me.
Hope this update solution would help you out. If yes please accept the answer to help others and if not then let me know.
If you have found any other working solution then please update your answer to help others out.
Cheers!

Related

How to get a user's location in Android

I have been trying to get user location in a weather app I am building. Since I'm pretty new to android development this is quite tough and so I have tried finding sources on how to make this, though after trying many different things it always ends up being a way too outdated version that no longer works.
So my question is what is currently the best way the get a user's location.
Thanks in advance for anyone that can help me with this!
It's enough to start reading from official doc: https://developer.android.com/training/location
or from here ready solution https://www.geeksforgeeks.org/how-to-get-current-location-in-android/

How to auto receive calls programatically in android versions above kitkat

I am trying to develop an app which auto receive calls from particular numbers.
Like i can add the numbers that i want to auto receive. I did a lot of research and found similar questions but none of them worked. Some codes did work but only upto kitkat version and code did not work on versions above kitkat. I want the code that support all android versions. Its very important for me so please answer quickly. I really need your help.
I want the app to work in background so also please help me and write the code to implement this in a background service.
I was successful to run the app on versions upto kitkat but above kitkat the code does not work.
Android very specifically does NOT allow this, because doing so is an opening to a lot of telephone scams involving reversed charges. They've actually never allowed it, but people found hacks on old versions to get around that. Every time Google finds one of these, they shut it down in the next version. So there is no reliable way to do it, and if you find a way expect it to disappear shortly afterwards.

How to use the rear camera in a mobile navigator using Gwt-Elemental 2.8

I am using gwt-elemental 2.8.
I followed this example to take a photo using the active web-cam:
https://github.com/henrikerola/FaceLogin
It works fine, but now I need to use the rear camera when the page is visited by a mobile device.
I have done some research about it and found that the methods capable of giving me back the available devices are: MediaStreamTrack.getSources(gotSources); or MediaDevices.enumerateDevices() but any of them is present in the gwt-elemental library.
A MediaStreamTrack interface exists but it has no way to obtain Sources (or I cant find it).
Can anyone help me? I'd really appreciate it.
Thanks a lot

How to code switch Mobile Data on / off and check current Status on all Android Versions?

I try to find a way to switch Mobile Daten on or off or check the current status on Android.
I search way to to that on all versions of Android (2.3+).
I already found a lot of code to do that. Also on Stack Overflow. But non of that really worked stable. Is there any stable and good coded solution somewhere?
Maybe a special Function/Class to do access that easily?
I believe Google took this command away from the developer but it works on older phones. I think on anything after lolipop you cant do this anymore.

Android - Questions about System-UI

So I was looking at the settings in CM10.1(4.2.2) and I saw an option to change the color of the softkeys using a color picker.
Now i'm working on an app and though doing something like that would be cool. But I don't understand how it does it. How does it change the color using code, and why doesn't it require a reboot?
Also, could I use a similar process to change the Colorado of the wi-fi inside my app as well? How would one do this. I am interested in how you can do this, as it would make a great addition to my app.
I saw I wasn't the only one wondering this, and I think this is a good question. If someone could, can you maybe explain what could be going on, and then explain how I could do it, and maybe give me a link to some code to take a look at?
Anything would help. I'm curious, but baffled. I think an answer could help not just me, but many others. Thanks!
Short answer: You can't using the public SDK.
Long answer: This is not a feature of stock AOSP. Cyanogenmod is a heavily modified version of Android, and features like this are implemented at a ROM level, not an app level. If you want to include this feature, you'll have to customize Android at a source level and build a system image for each and every device you want it on.
(Source - Google Employee)

Categories

Resources