HousekeepingBook.java
		
     状態:学習中
     閲覧数:2,038
		 投稿日:2013-07-19
		 更新日:2013-07-28
    
  
	
		
			・変数の設定
・「MonthSheet.java」に記載している「intentCalendarメソッド」で生成したカレンダー配列(?)を変数へ格納
▼/src/com/fc2/blog98/andromaker/housekeepingbook/HousekeepingBook.java
・カレンダー変数定義
・intentCalendarメソッド定義
▼/src/com/fc2/blog98/andromaker/housekeepingbook/MonthSheet.java
・intentCalendarメソッド定義
※2箇所で定義している理由は不明
    
   
    
・「MonthSheet.java」に記載している「intentCalendarメソッド」で生成したカレンダー配列(?)を変数へ格納
▼/src/com/fc2/blog98/andromaker/housekeepingbook/HousekeepingBook.java
・カレンダー変数定義
/* 変数の設定 */
int[] calendar=intentCalendar();
・intentCalendarメソッド定義
	public int[] intentCalendar(){
		Calendar calendar = Calendar.getInstance();//Calendarクラスのオブジェクトcalendarを生成
	    int year = calendar.get(Calendar.YEAR);//現在の年を取得
	    int month = calendar.get(Calendar.MONTH);//現在の月を取得
	    int day = calendar.get(Calendar.DAY_OF_MONTH);//年の何番目の日かを取得
		Intent intent1 = getIntent();
        year = intent1.getIntExtra("year",year);
        month = intent1.getIntExtra("month",month);
        day = intent1.getIntExtra("day",day);
        int date= year*10000+(month+1)*100+day;
        int[] calendarIntent={year,month,day,date};
        return calendarIntent;
	}▼/src/com/fc2/blog98/andromaker/housekeepingbook/MonthSheet.java
・intentCalendarメソッド定義
	public int[] intentCalendar(){
		Calendar calendar = Calendar.getInstance();//Calendarクラスのオブジェクトcalendarを生成
	    int year = calendar.get(Calendar.YEAR);//現在の年を取得
	    int month = calendar.get(Calendar.MONTH);//現在の月を取得
	    int day = calendar.get(Calendar.DAY_OF_MONTH);//年の何番目の日かを取得
		Intent intent1 = getIntent();
        year = intent1.getIntExtra("year",year);
        month = intent1.getIntExtra("month",month);
        day = intent1.getIntExtra("day",day);
        int date= year*10000+(month+1)*100+day;
        int[] calendarIntent={year,month,day,date};
        return calendarIntent;
	}※2箇所で定義している理由は不明