FAB and notification creation fragment

This commit is contained in:
danijoo
2015-12-31 19:43:31 +01:00
parent 5f7ca16082
commit b8b81df4d2
11 changed files with 142 additions and 10 deletions

View File

@@ -0,0 +1,31 @@
package net.headlezz.notificationlogger;
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
public class NotificationCreationFragment extends Fragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
TextView textView = new TextView(getContext());
textView.setGravity(Gravity.CENTER);
textView.setText(getClass().getSimpleName());
return textView;
}
@SuppressWarnings("ConstantConditions")
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
((AppCompatActivity) activity).getSupportActionBar().setTitle(getString(R.string.title_create_notification));
}
}