I know it should be in the style sheet area for this, but when I created a new Android app using Android Studio, it has a user logo and user information in a green box. This is what I want to edit.
First it should ask them to login if first time using the app.
But let's deal with one thing at a time, and first is me getting use to where Google puts things.
If you look at your layout activiy you will find a "NavigationView", there are 2 attributes there you need "header" and "menu".
You can see in this answer how.to get the views inside the "header" file: https://stackoverflow.com/a/33631797/4017501
There is another alternative. The "NavigationView" is a ViewGroup. So you can use it as such. Delete thee "header" and "menu" attribute and add the closing brackets as if were a ViewGroup:
<NavigationView></NavigationView>
Now you can simply put a fragment inside and then find every view and handle your logic from the fragment, is a more direct and customizable approach.
Related
I often put user registration on one xml file with scroll view.
I have learned when a user sees too many fields they opt out of the app so I am planning to upgrade the layout to look like the one for gmail when you sign up on android app. It appears to be using tabbed view but not tabs available and user navigates to the next view by clicking next (refer to attached images).
First page
second page
MY QUESTION
My question is how do I create this views, do I need many xml layout files or put all stuff on one file and use visibility as in once it is filled and user presses next hide the inputs and reveal the next inputs. Note: Gmail appears to be scrolling to another page the way it would appear when using tabs.
You can use one activity to host multiple fragments. The new Android Studio update has Navigation Editor which you can use to achieve similar results.
it is totally up to you how you want to design this but the best thing is you use Fragment and viewpager instead of using two separate layouts.
See Here how to use fragment with viewpager
There are many ways to do this, If you have less content then play with visibility otherwise ViewFipper ( https://abhiandroid.com/ui/viewflipper ) Or can use Fragments
I am new to writing Android apps, I have been using the internet and Android Studio to create an app for my club as a bit of fun and learn along the way. I have been watching videos, using tutorials and walkthroughs and I am getting to learn the basics.
However, I have got stuck. I used a drawer template from Android Studio and added the activities I needed and buttons on the main screen to the activities and they all worked fine, no overlapping. When I tried to link the drawer icons to the activities, rather than use the buttons on the main screen, they work, but the app (visually) puts the next activities content on top of the one before.
I cant find anything on the internet except something called backstacking, but that is described when the back arrow is used, my problem is to do with selecting an activity from the drawer menu. I have attached a picture to show what I mean. It gets worse the more menu items that are selected.
If anyone could help, it would be great!
If you are using XML root layout as a constraint layout maybe your constraints are missing. If you are using constraint layout set both top/bottom and left/right constraint.
If your constraints only top for example it is look good on desing but in device that dont know where to positioning left or right and automatically positioning 0 point to top.
When you click one any one menu item put the visibility of other images as gone like
visibility(View.GONE);
and the one selected to be visible
How do I make an Android activity like the one shown in this image.
I am asking specifically about how to make a component such as the repeat and reminder components. And also, the two tabs showing Add Event and Add Task.
I'd also like to know the name by which they are referred.
Touching Repeat, a list dialog box appears. Touching Reminder, different times can be set which can be removed by a minus sign (-) which appears beside them. The tabs cannot be slid, but they need to be clicked to go to a particular tab.
It looks like it's just a listview on top of a tabbed activity.
When you create a new Activity, you can just specify tabbed activity and Android studio takes care of creating the tabs.
Then for the items, you just use listview, unless it'll turn out to be a really long list, then a recyclerview is recommended.
Hope that helps (:
I want to create a set of pages in an Android app that swipe horizontally and use tickmarks to indicate the position of the current page within the set of 12 pages that I have.
The design pattern of using tickmarks like this is mentioned in the Android design documentation.
http://developer.android.com/training/design-navigation/descendant-lateral.html
See figure 7
Are tick marks implemented as part of class within Android or do I need to create my own? Has anyone implemented tick marks who would be happy to share their code?
If you don't want to use a third party or you are rushing, you may want to use a RadioGroup as the tickmark or page indicator with each of the RadioButton corresponds to each page, You may put a text label on each page and the radio button group must be in horizontal orientation just like the tickmark.
It will also add some intuitive function because when the user tick a radio button it will go directly to the intended page without needing to traverse all of the pages.
This library by JakeWharton looks like it will do the job.
http://viewpagerindicator.com
Hi I am developing an application that needs to display list of items. Clicking (or Tapping) on an item should display a description text of the item right below the item. I am talking about something like a vertical accordion.
I want them dynamically created (created in code rather than the XML). That part was completed with ease. I inflated multiple SlidingDrawer in a LinearLayout to accomplish it.
But the problem is only one SlidingDrawer is displayed in the activity. This was accomplished by giving fixed heights to SlidingDrawer. This approach will not hold as I mentioned above that the list of items is dynamically generated and also the area in the activity where the description of the item must come remains blank.
I am now looking for alternative views for accomplishing this. As I am a beginner in Android Development I cant find any that will work in android versions 2.3 and later.
You can always take a look at the SlidingMenu. The project can be found on GitHub. I guess you need to modify the behaviour a bit.