I've been tasked to implement an appointments app. The main screen is to display the days of the current month and which year it is and the user can perform various tasks by selecting a day and pressing one of 6 buttons.
I'm a little lost as for where to start on this. Should I create a view in XML or would it be better to do it in the code? I've read up on the calendar class but have had no luck actually getting an example working.
Any suggestions/examples on how to get started on this would be appreciated.
Thank you.
I know there is already an accepted answer, but this might be helpful.
Creating your views in xml also helps you seperate your functionality from your ui. Similar to the Model View Controller concept. This is considered good practice.
you'll write code to work with the layouts you create in XML
Related
My question is how can I put a lot of data in android application,or what is the best way to solve my problem ?
I'm building an app that will contain about 43 lessons,every lesson will be accessed through cardview and every lesson will have a lot of text,images and maybe some other things.
Is the best way to solve this to do every lesson manually,or there is another way that I could solve this.
This is how lessons should look like in cardview (similar)
And when i click on cardview needs to display me a lesson.
My problem is only text,image and other things in that lesson.
You need to store all your data in a database and populate your contents in a recycler list. With this you can click on each item to view a particular lesson.
You will eliminate the need to create multiple activities for each lesson.
You will have a small app size
I have a project in github that might help you https://github.com/mbobiosio/SqliteDatabaseAssets and this is the Kotlin version https://github.com/mbobiosio/WordCup18Team
I want to implement a list like a leaderboard into my project. I saw an example which usw the Android native ListView class but is this the right way? Does any body know a solution?;)
I don't have a solution but since you got no answer yet, I wanted to inform you that I used the native ListView class and it worked like a charm !
Easy to implement and I haven't heard about any other way to do so with Andengine yet (there might be though). This only is a return of experience, hope it helps !
Here is a tutorial that will demonstrate how to create, add and update ListViews:
http://www.vogella.com/tutorials/AndroidListView/article.html
After practicing the concepts in the tutorial, please keep in mind that every row in a list (a separate view) is recycled - while you do not need to inflate it again, you do need to ensure that you set/selete/update any and all information on it, otherwise you get funky bugs. Hope this helps.
You can use the approach from Google Play Game Services.
Your game activity can extend AndEngine's BaseGameActivity. The leader-board activity can extend a normal ListActivity.
In your game start the leaderboards activity with startActivityForResutl. When the user is done, he just goes back to your game activity.
I need to embed the native month-wise calendar with my xml layout, which will also contain some other components inside the layout.. it should also show all the calendar events shown for the specific month. Since i am a beginner in android, any source or example will be very useful !!
Thanks in Advance
In your case I think you have to use Datepicker, just go throgth this example
Haha, funny how I am currently doing just this. There is no built in view to do this, and even fewer examples of any specific code. You will need to build one from scratch. Luckily, Android does come built in with a class to help with the calculations that would otherwise be very annoying:
http://developer.android.com/reference/android/util/MonthDisplayHelper.html
What does this mean? Well you need to use your own code to build it out. If you have Java experience, should not be too bad just playing around with the dates and whatnot and add them into a table or grid layout (Layouts you should probably go with). As soon as you get the hang of it, then you can get into more complex features.
Try using a grid view and fill according to month array with date-time picker you can get a specific date and time each cell click you can show a list which would help user to make reminder or add note specific to that selected date.
Please have a look on this image
The whole review section will slide according to days of week saturday monday etc..
Inside values are dynamic and will come from server accordingly
there are also buttons named comment,agreeand report abuse which will update values as according to their name
How can I achieve this kind of functionality in android.
That is I am in need of sliding functionality (Left and right both)which contains a list view with dynamic changing elements. and button on click which functionality will be there as accordingly
Please help me ASAP
thanks
Abhinav
HI guys I have found the solution of my own question
See this
android gestures
and this link
Switching between activities stack over flow
Thanks for visiting my question
Try to look at ViewPager class in Android Compatibility Package.
I've read several example programs and tutorials to try and solve my problem but they all seem to go the same way. I've used a couple Activities and xml documents to create a menu that loads when my game starts. When the user clicks the "Start The Game" button, it loads a new Activity that sets the view with my game thread and all of the game properties. I know this activity works because I've run it alone as its own project, but every way I've tried to start it after the Menu, I get a nullPointerException and it force closes. I read the SurfaceViewOverlay tutorial and attempted to use that implementation, but I'm using a SurfaceView, not a GLSurfaceView. I'm debating rewriting my entire program to use OpenGL but I figured I would see if anyone else knows what I'm doing wrong here. If you need the code snippets I can paste some here, but it's not really the specific code that's wrong, I think it's the way I'm using(abusing) the language...
Thanks for any help,
Aaron
I discovered my problem quite some time ago, but figured I would come back and give an answer to anyone else having my problem. When using a SurfaceView it must be part of the activity that created it and be in some sort of FrameLayout in the xml for that activity.
For example:
<com.example.MySurfaceView
android:id="#+id/mySurfaceView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
You can add any other layout elements you would like, but this is required to create the SurfaceView. I hope this helps anyone else who had my problem, for any further questions just ask and I'll be sure to elaborate if necessary.