Skip to content

ronaldoeyeem/FragmentAnnotation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FragmentAnnotation

Simple annotation for Android fragment building

public class MyFragment extends Fragment {

  @FragArg
    String name;
    
  @FragArg
  int value;
  
  @Override
  public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState);
    MyFragmentBuilder.inject(this); // here the values are read from the Bundle in `.getArguments`
  }

}

// when initing the fragment
MyFragment f = new MyFragmentBuilder
    .setName("name")
    .setValue(42).build; // the values are stored in a Bundle in the .`setArguments`


About

Simple annotation for Android fragment building

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages