Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CriminalIntentApp
package criminalintent.android.bignerdranch.com.criminalintent;
import java.util.UUID;
/**
* Created by koemdzhiev on 23/02/2015.
*/
public class Crime {
private UUID mId;
private String mTitle;
public Crime() {
this.mId = UUID.randomUUID();
}
public UUID getmId() {
return mId;
}
public String getmTitle() {
return mTitle;
}
public void setmTitle(String mTitle) {
this.mTitle = mTitle;
}
}
package criminalintent.android.bignerdranch.com.criminalintent;
import android.support.v4.app.FragmentActivity;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class CrimeActivity extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_crime);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment