3月24日,着手开发 CriminalIntent,Android 开发,每日20行,第15天。
程序员文章站
2024-03-17 19:52:04
...
CrimeActivity.java
package com.example.aster.criminalintent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class CrimeActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_crime);
}
}
Crime.java
package com.example.aster.criminalintent;
import java.util.Date;
import java.util.UUID;
/**
* Created by aster on 18-3-24.
*/
public class Crime {
private UUID mId;
private String mTitle;
private Date mDate;
private boolean mSolved;
public Crime() {
mId = UUID.randomUUID();
mDate = new Date();
}
public UUID getId() {
return mId;
}
public String getTitle() {
return mTitle;
}
public void setTitle(String title) {
mTitle = title;
}
public Date getDate() {
return mDate;
}
public void setDate(Date date) {
mDate = date;
}
public boolean isSolved() {
return mSolved;
}
public void setSolved(boolean solved) {
mSolved = solved;
}
}
activity_crime.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"/>