I added the calender view to my black activity.
<LinearLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".Homepage">
<CalendarView
android:id="@+id/calender_view"
android:onClick="hoursLog"
android:layout_width="match_parent"
android:layout_height="match_parent">
</CalendarView>
What I want to do now is basically be able to select a date from the calender and enter numbers (hours logged) which is tied to that specific date kind of like how a reminder functions.
I know I have to create a new activity and an intent but I'm lost as to how I can 'attach' that activity page to a specific date. Like having it function as a part of the calender and not a new entity entirely.
I got this far in my .java file
public class Homepage extends ActionBarActivity {
public void hoursLog (View view){
Intent intent = new Intent (this, DisplayHoursLog.class);
CalendarView cView = (CalendarView) findViewById(R.id.calender_view);
}
Aucun commentaire:
Enregistrer un commentaire