protected void setupUI() { Log.d(TAG, "setupUI NutritionMonthlyHome"); urenamReportButton = (Button) findViewById(R.id.monthlyURENAMButton); urenasReportButton = (Button) findViewById(R.id.monthlyURENASButton); ureniReportButton = (Button) findViewById(R.id.monthlyURENIButton); inputsReportButton = (Button) findViewById(R.id.monthlyInputsButton); resumeReportButton = (Button) findViewById(R.id.resumeReportButton); resumeReportButton.setEnabled(false); saveAndSubmitButton = (Button) findViewById(R.id.saveAndSubmitButton); saveAndSubmitButton.setEnabled(false); // URENAM if (is_urenam) { NutritionURENAMReportData urenamReport = NutritionURENAMReportData.get(); urenamReportButton.setText( String.format(getString(R.string.nutrition_fillout_report), getString(R.string.urenam))); Constants.updateButtonCompletion(urenamReportButton, urenamReport.isComplete()); urenamReportButton.setOnClickListener(this); } else { urenamReportButton.setVisibility(View.GONE); } // URENAS if (is_urenas) { NutritionURENASReportData urenasReport = NutritionURENASReportData.get(); urenasReportButton.setText( String.format(getString(R.string.nutrition_fillout_report), getString(R.string.urenas))); Constants.updateButtonCompletion(urenasReportButton, urenasReport.isComplete()); urenasReportButton.setOnClickListener(this); } else { urenasReportButton.setVisibility(View.GONE); } // URENI if (is_ureni) { NutritionURENIReportData ureniReport = NutritionURENIReportData.get(); ureniReportButton.setText( String.format(getString(R.string.nutrition_fillout_report), getString(R.string.ureni))); Constants.updateButtonCompletion(ureniReportButton, ureniReport.isComplete()); ureniReportButton.setOnClickListener(this); } else { ureniReportButton.setVisibility(View.GONE); } // Resume Report resumeReportButton.setOnClickListener(this); // Stocks inputsReportButton.setText( String.format(getString(R.string.nutrition_fillout_report), getString(R.string.inputs))); NutritionInputsReportData inputsReport = NutritionInputsReportData.get(); Constants.updateButtonCompletion(inputsReportButton, inputsReport.isComplete()); inputsReportButton.setOnClickListener(this); // Submit Button final CheckedFormActivity activity = this; saveAndSubmitButton.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { // transmit SMS requestPasswordAndTransmitSMS( activity, NutritionMonthlyReportData.get().getName(), Constants.SMS_KEYWORD_NUT_MONTHLY, buildSMSText()); } }); // Update UREN levels NutritionMonthlyReportData monthlyReport = NutritionMonthlyReportData.get(); monthlyReport.updateUren(is_urenam, is_urenas, is_ureni); if (monthlyReport.isComplete()) { resumeReportButton.setEnabled(true); saveAndSubmitButton.setEnabled(true); } }