Attribute value expected (Android Studio) - android

what i wanna do is when they click the Rate button it brings up the 5 stars for them to rate but i am getting this Attribute value expected error.
need 10 rep to post images so imma just give link to image.
Error : http://prntscr.com/7iiy1k
...what i really want is a personal helper. Teamviewer or share screen on skype and help me out with this... i just need a boost. i am experienced with Visual Studio just need help with Android Studio.
Thank you.

It seems you messed up your layout and visibility atrtibute is wrongly formatted. Change it to
android:visibility="VISIBLE, INVISIBLE, or GONE."
Not sure if you also need to add onClick since it's part of the mess
android:onClick="YourFunction"

Related

Android studio code insight not showing everything

Android Studio shows code suggestions, but not all available codes are in the suggestion.
For example, layout_alignParentLeft will not be suggested, however, the documentation still shows it is a valid code.
Is there a setting that enables Android Studio to show all available codes?
Probably the parent of yourview is a ConstraintLayoutwhich doesn't have the attribute layout_alignParentLeft.
Try with a RelativeLayout instead and then you will see layout_alignParentLeft into the suggestions.

How can I track down the cause of Android "found an invalid color" error

During build of my android application I am getting the following error:
:app:mergeDev_testingDebugResources
error: found an invalid color.
I don't get any line of code or even which file it is having a problem with. I have a large number of outstanding changes (stupid me) which I don't want to roll back - but I'm totally stumped as to how to work out what is wrong.
For future reference - this error is what you get if you have added an image as a 9-pack and it isn't yet properly formatted with the black pixel borders. The error message could be far more helpful, i.e. actually saying which file the error occurs with would be nice, but the solution is just to go through all your 9 pack files in Android Studio and open then save each of them.
First of all, check your layout directory in file explorer bcoz when you have made changes in the main layout file then you could have changed respective example: v-21 or v-13 layout file too. This error occurs when you apply some element property which is not supported by previous versions like v-21.
I hope I have given detail about this, if any explanations are needed plz let me know.
Yes, the problem is in 9-path image. At least in my case.
The problem was in black lines in the borders of image. It should be only black and transparent. Nothing else. In my case there was shadow from view with alpha. With photoshop I remove any color pixels of borders (except black lines)
At Android Studio launch Analyze -> Inspect code. Then resolve all errors
In my case , i have done mistake while writing color,
like -
<color name="mainBackground">#8e00ed></color>
then look i have added extra symbol this-">" after my color ,
it should only be
<color name="mainBackground">#8e00ed</color
Then it worked fine for me.
Just check between two symbols "only color code" should come "no extra symbols,no apostophies,no semicolons" should be there.
Thank You!!!

Android XML preview only showing top level Screen in Android Studio

I'm working from the sample code given here: https://github.com/playgameservices/a… but when I try to edit the views, I can only see the login screen "LoginLayout" in the component tree. All the other views: maths_layout, gameplay_layout, I cannot see. Please see my screenshot to see what I mean.
How can I see the other screens in the editor and modify them?
Thanks!
Maybe the other layouts are set as invisible/gone. Try to post the url again please, its not correct in original question.

Multiple Layouts Previews for Android in Eclipse

Hey guys I am trying to get multiple layouts previews for a single app in the Graphical view in eclipse for android. like how our layour would look on different screen sizes.
here is how it looks
Hope someone will help me out with this...
Also I have searched here before posting but didnt get it so dont down rate please.
Thanks
In the image below, click where the arrow is pointing to and select "Preview All Screen Sizes"
I guess that's a little hard to see but its the little page icon right next to "Pallete" on the top-left. Its the layout configuration drop-down.
you can add more previews and show all of the previews, as shown on the google IO video:
http://www.youtube.com/watch?v=Erd2k6EKxCQ
it's shown on 20:30

Android Application Layout Help

Hi does anyone know how to add/change the colour of the application layout. It is a .xml file
I'd like to add a border and change the background colour. There are also text fields in there, is it possible to add a border/border colour to the text fields.
I am a novice by the way!
Thanks
If you are new to this, you should use Eclipse with Android SDK plugin. In Eclipse, you can use the visual layout editor which will give you a fast and easy answer to your questions, and even more.
android:background="#ffffff" for white bg .
2 b vry frank 4 a beginner, developer site or other tutorials will prove much more effective den putting questions here .

Categories

Resources