Added the other sections
This commit is contained in:
parent
9e6d755e45
commit
d503e14358
4 changed files with 145 additions and 89 deletions
|
@ -0,0 +1,17 @@
|
|||
package de.marcelkapfer.morseconverter;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
/**
|
||||
* Created by mmk on 2/14/15.
|
||||
*/
|
||||
public class AboutFragment extends Fragment{
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
|
||||
return inflater.inflate(R.layout.fragment_about, container, false);
|
||||
}
|
||||
}
|
|
@ -7,13 +7,18 @@ import it.neokree.materialnavigationdrawer.elements.MaterialSection;
|
|||
|
||||
public class MainActivity extends MaterialNavigationDrawer {
|
||||
|
||||
private MaterialSection writtenMorse;
|
||||
private MaterialSection writtenMorse, normalMorse, about;
|
||||
|
||||
@Override
|
||||
public void init(Bundle savedInstanceState) {
|
||||
writtenMorse = this.newSection("writtenMorse", new MainFragment());
|
||||
normalMorse = this.newSection("Normal Morse", new MorseFragment());
|
||||
about = this.newSection("About", new AboutFragment());
|
||||
this.addSection(writtenMorse);
|
||||
this.addSection(normalMorse);
|
||||
this.addBottomSection(about);
|
||||
this.setDrawerHeaderImage(this.getResources().getDrawable(R.drawable.feature_graphics));
|
||||
allowArrowAnimation();
|
||||
this.disableLearningPattern();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package de.marcelkapfer.morseconverter;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
/**
|
||||
* Created by mmk on 2/14/15.
|
||||
*/
|
||||
public class MorseFragment extends Fragment{
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){
|
||||
return inflater.inflate(R.layout.fragment_morse, container, false);
|
||||
}
|
||||
}
|
Reference in a new issue