add some navigation between activities
This commit is contained in:
parent
047ef895c1
commit
b96ab2c3c4
|
@ -31,19 +31,23 @@
|
|||
|
||||
<activity
|
||||
android:name=".activities.AboutActivity"
|
||||
android:label="@string/about"/>
|
||||
android:label="@string/about"
|
||||
android:parentActivityName=".activities.MainActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".activities.DayActivity"
|
||||
android:label="@string/details"/>
|
||||
android:label="@string/details"
|
||||
android:parentActivityName=".activities.MainActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".activities.EventActivity"
|
||||
android:label="@string/event"/>
|
||||
android:label="@string/event"
|
||||
android:parentActivityName=".activities.DayActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".activities.LicenseActivity"
|
||||
android:label="@string/third_party_licences"/>
|
||||
android:label="@string/third_party_licences"
|
||||
android:parentActivityName=".activities.AboutActivity"/>
|
||||
|
||||
<activity
|
||||
android:name=".activities.SettingsActivity"
|
||||
|
|
|
@ -124,6 +124,7 @@ public class DayActivity extends SimpleActivity
|
|||
datePicker.init(dateTime.getYear(), dateTime.getMonthOfYear() - 1, dateTime.getDayOfMonth(), null);
|
||||
|
||||
alertDialog.setView(view);
|
||||
alertDialog.setNegativeButton("Cancel", null);
|
||||
alertDialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
final int month = datePicker.getMonth() + 1;
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.simplemobiletools.calendar.activities;
|
|||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import com.simplemobiletools.calendar.Config;
|
||||
import com.simplemobiletools.calendar.R;
|
||||
|
@ -16,4 +17,15 @@ public class SimpleActivity extends AppCompatActivity {
|
|||
setTheme(mConfig.getIsDarkTheme() ? R.style.AppTheme_Dark : R.style.AppTheme);
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
finish();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue