According to the internet, Viewpager is a layout holder for SliderView. The only useful link I found is Proper implementation of ViewPager2 in Android but it doesn't explain how to use the adapter.
I have found examples using Kotlin but I'm using Java. To worsen the situation, all the examples only show the most basic thing - how to use them in Mainactivity. Since my project is to use the sliderview in a fragment, none of the examples are usable. I've tried copying the code and pasting them in a fragment just in case it works and I persistently get red squiggly lines, an indication that they can't be accepted. If someone can provide help to use both SliderView and Viewpager in a fragment, I'll be really grateful.
Related
I wanted to use the TextInputLayout/TextInputEditText in my app and was looking for ways to style this. Now there are lost of paged when you start googling on it but it also seems some thinks have changed in the current android version.
Do not misunderstand the pages where very usefull but did not supply a complete answer.
For that reason i am posting my end result here so others may benefit.
Before i explain in the answer below i want to thank Dmytro on his blog here as it was the most usefull.
The answer.
I made my example very colorfull to make it easier to understand.
To get to this result i used the following in my layout. sorry that it is not code but a picture but i did this so you can see the actual color and not just my name for it
Not a color thing, but as you can see i set the app:errorEnabled to true. this is done so the space needed for the error is already reserved which means your layout wil not rescale when there is an error.
the last thing you need it the border_color.xml:
Play around with the option to see what they do.
The only thing i did not manage to do in the layout is to change the color of the selectionHandles. I did find a code solution for it but...i'll keep looking.
Just created a first libgdx project and imported it into android studio. I am used to hovering over a method or a class and by option/alt clicking it, a little box shows up that tells me what this method/ class is good for. Is there a libgdx support for that kind of thing in android studio? It is a huuuge timesaver if you are a newbie like me.
AS is based on IDEA, Ctrl+Q should work for Quick Documentation when cursor is inside method or class name. You can also Ctrl+LeftClick to go to source of the class or method.
I'm a beginner to android but have done a little with an older version of Android Studio, and in the new version I'm having a lot of trouble getting the java file to find buttons or ImageViews. I'm not sure if it's related to the content_main vs activity_main thing. I'm having trouble finding any answers as to how this works on Google, so I'm just starting here, I want to put a button on the main page of my app and have the java file that correlates to the XML file find it. How do I do this?
Answers online are very vague to me, things like "activity_main.xml will determine how the look of the main activity should be. And on the other hand content_main.xml will determine the contents in the activity_main.xml" does not mean anything to me. Please tell me where to put the button!
If you are adding a button in activity_main rather than content_main it cannot be recognized by your Java file. Not only that is will even not be visible on your app.
I'd like to be able to display an image below a class-level javadoc in Android Studio. My assumption is that I should write a plugin to make this happen.
Does anyone know what I need to do to get an image (JPEG or PNG) to display below a class-level javadoc comment in a Java class file?
I looked into basic information about creating an IntelliJ IDEA plugin but I have no idea where to look to accomplish my task.
This is not possible in the current version of IntelliJ IDEA. The editor can display only text, and does not support embedding of non-text things such as an image file.
You can display images on hover, or in popups, or in dialogs, but not within the editor itself.
Do you want the image to show in the class' source code itself? As an aside, images in Javadocs will show when you view the formatted javadoc view the Quick documentation action (Windows/Linux: Ctrl+Q or Mac: ^J)
If you still want the image to show in the source code, then yes, you will need to write a plug-in. You can look at the Information for Plugin Developers
Setting Up the Plugin Development Environment section of this web page - https://www.jetbrains.com/idea/plugins - to get started. You'll have to dig through source code to try and find some ideas for how to display an image in the source code. As much as I love IntelliJ IDEA, there plug-in documentation is a bit weak. When I wrote a plug-in, I had to do a lot of looking through the IDEA code to find code that was doing things similar to what I wanted to do. I also downloaded the source code for some of the better plug-ins out there and looked through them.
Finally, you can ask for some guidance in the IntelliJ IDEA Open API and Plugin Development forum. That forum is monitored by JetBrains developers. Your best bet to getting answers in that forum is to ask very specific questions. Do not try and get someone to explain from start to finish what you need to do. As you do each step, ask questions about what you are trying to do.
I have recently got a Mac and I have downloaded Xcode 4.2 from the store. I am trying to get to grips with iPhone development but I am having real troubles. All the tutorials I seem to find online, when they create a project, they had a resources folder, and inside that there is xib file which allows them to use an interface builder.
This does not appear on 4.2, so makes it kinda hard to follow majority of tutorials have the resources folder. How do I get this back? Or how do I access this file on 4.2?
Also, I could someone explain to me where the objects list is? I started following this tutorial
http://maybelost.com/2011/10/tutorial-storyboard-in-xcode-4-2-with-navigation-controller-and-tabbar-controller-part1/
as it seemed to be using Xcode 4.2, but when I get down to the storyboard section, it says
"Of course, we really want another tab on there so we can see the switching between the two – so lets drag in another Navigation Controller from the Utilities (objects) list and plonk it down somewhere. "
Except I cannot find this objects list? How do I open this objects list? What am I missing?
Sorry if these questions seem very basic, I am new to both Macs and iPhones. Android development seems a HELL of a lot easier from what I can see so far.
Thanks in advance for any help.
Also would be grateful if anyone could point in direction of any good up to date tutorials
I have a post on http://www.armandvanderwalt.co.za it will give you a nice understanding of how most stuff fits together, I don't use Interface Builder at all since it only makes the app bigger. Have a look at my blog post, still need to do styling, and add more posts but it is a nice beginner guide.
Most posts you are finding still use XCode 3 that's why you can't find certain things.
Also have a look at http://www.raywenderlich.com
What they are referring to as the object list, in XCode 4 it is found in the bottom right corner of Interface Builder. In XCode 4 Interface Builder is part of XCode and no longer an external application. Therefore when ever you open a XIB file Interface Builder also automatically opens