Ripristinati template
This commit is contained in:
82
.idea/fileTemplates/Android Fragment.java
generated
Normal file
82
.idea/fileTemplates/Android Fragment.java
generated
Normal file
@@ -0,0 +1,82 @@
|
||||
#set( $regex = "([a-z])([A-Z]+)")
|
||||
#set( $replacement = "$1_$2")
|
||||
#set( $dashName = $NAME.replaceAll($regex, $replacement).toLowerCase())
|
||||
#set( $variableName = $NAME.replace($NAME.substring(0, 1), $NAME.substring(0, 1).toLowerCase()))
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import it.integry.integrywmsnative.MainApplication;
|
||||
import it.integry.integrywmsnative.core.expansion.BaseFragment;
|
||||
|
||||
public class ${NAME}Fragment extends BaseFragment {
|
||||
|
||||
/*
|
||||
- Create the following layout resource file [fragment_${dashName}.xml]
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
|
||||
<data>
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@Inject
|
||||
${NAME}ViewModel mViewModel;
|
||||
|
||||
//private Fragment${NAME}Binding mBindings;
|
||||
|
||||
|
||||
public ${NAME}Fragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
public static ${NAME}Fragment newInstance() {
|
||||
return new ${NAME}Fragment();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
setRetainInstance(true);
|
||||
|
||||
//mBindings = Fragment${NAME}Binding.inflate(inflater, container, false);
|
||||
//mBindings.setLifecycleOwner(this);
|
||||
|
||||
|
||||
/*
|
||||
- Add following lines into MainApplicationComponent
|
||||
|
||||
[a] into @Component
|
||||
${NAME}Module.class
|
||||
|
||||
[b] into interface body
|
||||
${NAME}Component.Factory ${variableName}Component();
|
||||
*/
|
||||
MainApplication.appComponent
|
||||
.${variableName}Component()
|
||||
.create()
|
||||
.inject(this);
|
||||
|
||||
return mBindings.getRoot();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user