2015-01-02 11:43:24 +01:00
|
|
|
package de.marcelkapfer.morseconverter;
|
|
|
|
|
2015-02-14 18:45:28 +01:00
|
|
|
import android.content.res.Resources;
|
2015-01-02 11:43:24 +01:00
|
|
|
import android.os.Bundle;
|
2015-02-14 17:31:42 +01:00
|
|
|
import it.neokree.materialnavigationdrawer.MaterialNavigationDrawer;
|
|
|
|
import it.neokree.materialnavigationdrawer.elements.MaterialSection;
|
2015-01-02 11:43:24 +01:00
|
|
|
|
2015-01-04 20:50:43 +01:00
|
|
|
|
2015-02-14 17:31:42 +01:00
|
|
|
public class MainActivity extends MaterialNavigationDrawer {
|
2015-01-04 20:50:43 +01:00
|
|
|
|
2015-02-14 17:45:23 +01:00
|
|
|
private MaterialSection writtenMorse, normalMorse, about;
|
2015-01-02 11:43:24 +01:00
|
|
|
|
|
|
|
@Override
|
2015-02-14 17:31:42 +01:00
|
|
|
public void init(Bundle savedInstanceState) {
|
2015-02-14 18:45:28 +01:00
|
|
|
Resources res = getResources();
|
2015-02-14 17:31:42 +01:00
|
|
|
writtenMorse = this.newSection("writtenMorse", new MainFragment());
|
2015-02-14 18:45:28 +01:00
|
|
|
normalMorse = this.newSection(res.getString(R.string.normalMorse), new MorseFragment());
|
|
|
|
about = this.newSection(res.getString(R.string.about), new AboutFragment());
|
2015-02-14 17:31:42 +01:00
|
|
|
this.addSection(writtenMorse);
|
2015-02-14 17:45:23 +01:00
|
|
|
this.addSection(normalMorse);
|
2015-02-14 18:45:28 +01:00
|
|
|
this.addDivisor();
|
|
|
|
this.addSection(about);
|
2015-02-14 17:31:42 +01:00
|
|
|
this.setDrawerHeaderImage(this.getResources().getDrawable(R.drawable.feature_graphics));
|
|
|
|
allowArrowAnimation();
|
2015-02-14 17:45:23 +01:00
|
|
|
this.disableLearningPattern();
|
2015-01-02 11:43:24 +01:00
|
|
|
}
|
|
|
|
}
|