i am trying to create an activity for users to input data in an android application. Many inputfields are required and i therefore wanted to make them into multiple fullscreen scrollable pages.
Like this only with input fields in each slide
I have downloaded the code from this git: https://github.com/akrajilwar/Android-Intro-Slider-Screen, but i dont know how to put input fields in each of this views. As you can see in the git; each of the sliding pages are different xmls but they have no corresponding java files. All code is in a java file which has a viewPage in it.
I am struggeling to come up with any ideas on how to do this. I cant find something similar any place on the internet and need some advice for how to do this, either building on what they already have done in the git or something completely different.
Related
I'm trying to make a really simple app for a friend to display his bar's ordering website in an app for when they reopen with the social distancing measures in place. The web app already exists, so this is really a simple matter of displaying the content in a WebView.
I've got the page loading, the content is visible, the styling is done - The only problem is that it doesn't seem to be loading all the elements. There's a line of filters at the top which just display as 3 dots (i.e. loading), and when I click any of the items on the menu, nothing happens. There should be a window pops up asking for a table number etc... If I open this in the Chrome browser on my phone, rather than a webview in the app it works perfectly so I know it isn't the website.
I've done the following;
setJavaScriptEnabled(true);
setJavaScriptCanOpenWindowsAutomatically(true);
setSupportMultipleWindows(true);
I've also turned off safe browsing in the manifest in case that was blocking anything. I have also given the app permissions to use the internet. I can't figure this one out at all and nothing online seems to be helping!
Admittedly I'm a tester (automated, but still), so coding isn't my best suit. I may be missing something really simple here. Any ideas?
Scratch that. For anyone who's interested, I needed to add this line;
setDomStorageEnabled(true);
For such a simple thing it proved impossible to find info on, I just enabled everything until something worked! So hopefully you don't have to do the same if you're looking at this.
I am trying to develop an application which would be a lot better if it had a clean ViewPagerUI. I dont need fancy menus (yet), all I want is that if I start my application It starts out as one relative Layout, and i can then swipe left and right to view two more Relative Layouts.
I have read, watched and studied tons and tons of tutorials in the past week, but they all seem to either be outdated, don't fit my needs (because they create new "pages" with a while/for loop, which is definetely not what i'm looking for), or are way to complicated/ leave out important information( i am a fresh developer, but I really don't want to give up) like the official guide on the android developers webpage.
I get that experienced developers can get a lot out of these tutorials, but I don't find them to be very informative for beginners/newbs.
Questions I asked myself while reading different guides are:
Which differernt java classes/ xml files do I need to create, and which code goes where?
How does the ViewPager know which Fragment I want to display on any page?
How can I add working, "connected" code to all three fragments?
To give you some helpful information:
The first page should display a chart
The second page contains edit texts, which add items to an array and thus to the chart on the first page on button click
The third page contains settings for the chart
I don't need ANY other pages/activities/main menus whatsoever. Only these three interacting pages.
I`ve found it to be the best option to go with relative layouts.
The second page should be the main page.
I am sorry if you think that my issue is dumb, but i am trying to create this app for over a week now, and i seem to not get any traction.
Thanks in advance!
I want to make an Android application that controls an Raspberry Pi (singleboard computer).
To do that, I want to create a control page like the one below:
As you can see, there are section headers, listview items with a switch, listview-items with a checkbox and listview-items with only text and listview-items that go to a new activity(of fragment).
I want to create the same thing for my android application. But I want to know what the best way is to create a page like this. I have already tried a listview with a CustomListAdapter, but the problem is that ALL my listview-items have a switch or ALL my listview-items have a checkbox, and so on.
So is it better to create a page like this in an other way? (build it mostly in the layout file, item for item?).
The Android API includes an easy way to handle this. You need to create a PreferenceActivity. The Android API documentation provides a full, thorough explanation with examples. You can find that here
I have looked quite a few places but can't seem to find this specific solution. I am interested in creating a menu that will always be visible across every layout/view of the application. This menu would act much like the header/menu of a website that is fixed and always exists across all pages of the site. I assume I can simply create a menu and have it's visibility shown from initialization but I'm not sure if that's the best way. I don't want the user to have to click any other buttons to open the menu, I just want it fixed and constantly visible from the start of the app.
Thank you.
Any help is appreciated.
Fragments, they are a way to define parts of the user interface. They are similar to activities, they have their own lifecycle. They are also closely tied to the life cycle of their parent activity.
You can add them statically by declaring them in your xml manifest and in your layout file
-or-
you can add them dynamically in runtime by creating them as java objects and xml layout files and then add them using the FragmentManager class.
check out the Documentation on the android developer website
https://developer.android.com/guide/components/fragments.html
also, check out some tutorials on youtube, I like these ones especially:
https://www.youtube.com/watch?v=6GyGtCMoR_U&list=PLonJJ3BVjZW4lMlpHgL7UNQSGMERcDzHo
Good Luck!
So I'm building an android application, I want the users to be able to press a button that opens a window/activity. I need the activity to allow the user to browse the pictures saved on the phone and be able to select those that they want. Once they select the pictures and press "ok" the pictures need to be copied to a directory for my application to access them from. So basically does anyone know of any code or help to do this and where would i be able to save user data for my app specifically on the android device. Thanks and let me know if you need any clarification!
It looks like you are expecting someone to complete your task. Instead of giving solution I would like to suggest you a way to do this, there on you can go and search and find a solution which will make you learn lot of things. Here are some articles where you can have some reading to start with.
Searching files on the android system.
Create a view where he can invoke search and select files
Storing files on internal storage
Now you need to do some homework and start hitting the keyboard, I'm sure you can do this easily