Android Open Source - marriagenda View Event






From Project

Back to project page marriagenda.

License

The source code is released under:

MIT License

If you think the Android project marriagenda listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.marriagenda.marriagendamobile;
/*ww  w. j a v  a 2  s.co m*/
import java.util.GregorianCalendar;

import marriagenda.controller.utilities.Event;
import marriagenda.controller.utilities.Location;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.RadioButton;
import android.widget.TextView;

public class ViewEvent extends Activity {

  private static final String TAG = "ViewEvent";

  TextView mEventTitle;
  TextView mEventDescription;
  TextView mEventDate;
  TextView mEventAddress;
  TextView mEventCity;
  TextView mEventState;
  TextView mEventZip;
  TextView mEventPlace;
  TextView mLocationComment;

  RadioButton mYes;
  RadioButton mNo;
  RadioButton mDontKnow;

  Event event;
  GregorianCalendar cal;
  Location loc;

  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.event_layout);

    Log.d(TAG, "onCreateCalled");

    mEventTitle = (TextView) findViewById(R.id.event_title);
    mEventDescription = (TextView) findViewById(R.id.event_description);
    mEventDate = (TextView) findViewById(R.id.event_date);
    mEventAddress = (TextView) findViewById(R.id.event_address);
    mEventCity = (TextView) findViewById(R.id.event_city);
    mEventState = (TextView) findViewById(R.id.event_state);
    mEventZip = (TextView) findViewById(R.id.event_zip);
    mEventPlace = (TextView) findViewById(R.id.event_place);
    mLocationComment = (TextView) findViewById(R.id.location_comments);

    mYes = (RadioButton) findViewById(R.id.yes);
    mNo = (RadioButton) findViewById(R.id.no);
    mDontKnow = (RadioButton) findViewById(R.id.dontknow);

    Log.d(TAG, "Succesfully Found all components");

    Intent i = getIntent();

    Log.d(TAG, "Attempting to retrieve passed info");
    event = (Event) i.getSerializableExtra("Event");
    cal = (GregorianCalendar) i.getSerializableExtra("Date");
    loc = (Location) i.getSerializableExtra("Location");
    Log.d(TAG, "Succesfully retrieved event " + event.getName());

    if (cal == null) {
      Log.d(TAG, "cal is null");
    }

    mEventTitle.setText("   " + event.getName());
    mEventDescription.setText(event.getDescription());
    Log.d(TAG, "Attempting to set Date");
    mEventDate.setText("12-15-2016");
    mEventAddress.setText("   " + loc.getAddress());
    mEventCity.setText("  " + loc.getCity());
    Log.d(TAG, "1");
    mEventState.setText("  " + loc.getState());
    Log.d(TAG, "2");
    mEventZip.setText("  " + Integer.toString(loc.getZip()));
    Log.d(TAG, "3");
    mEventPlace.setText(loc.getName());
    mLocationComment.setText(loc.getComments());

  }

}




Java Source Code List

com.marriagenda.marriagendamobile.Admin_Fragment.java
com.marriagenda.marriagendamobile.EventInvite.java
com.marriagenda.marriagendamobile.Guest_Fragment.java
com.marriagenda.marriagendamobile.MarriagendaActivity.java
com.marriagenda.marriagendamobile.MarriagendaRegister.java
com.marriagenda.marriagendamobile.MarriagendaSplash.java
com.marriagenda.marriagendamobile.NewEvent.java
com.marriagenda.marriagendamobile.ViewEvent.java
com.marriagenda.marriagendamobile.marriagendaLogin.java
marriagenda.controller.EventController.java
marriagenda.controller.MarriagendaController.java
marriagenda.controller.utilities.AdminList.java
marriagenda.controller.utilities.Event.java
marriagenda.controller.utilities.GuestBook.java
marriagenda.controller.utilities.GuestList.java
marriagenda.controller.utilities.Location.java
marriagenda.controller.utilities.Page.java
marriagenda.controller.utilities.User.java