All Projects → armcha → Easy-Fragment-Argument

armcha / Easy-Fragment-Argument

Licence: Apache-2.0 license
This library will help you to pass and receive fragment arguments in easier way

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Easy-Fragment-Argument

Tieguanyin
Activity Builder.
Stars: ✭ 113 (+564.71%)
Mutual labels:  fragments, annotations
symbok-bundle
Symfony annotations bundle
Stars: ✭ 50 (+194.12%)
Mutual labels:  annotations
Library-Spring
The library web application where you can borrow books. It's Spring MVC and Hibernate project.
Stars: ✭ 73 (+329.41%)
Mutual labels:  annotations
anor
anor: an annotation and visualization system based on R and Shiny framework
Stars: ✭ 28 (+64.71%)
Mutual labels:  annotations
GEAN
This toolkit deals with GEnomic sequence and genome structure ANnotation files between inbreeding lines and species.
Stars: ✭ 36 (+111.76%)
Mutual labels:  annotations
code-art
🌈 Collect beautiful art text, never bug. 收集好看的艺术代码,佛祖保佑,永无 Bug。找好看的注释,看这里。
Stars: ✭ 38 (+123.53%)
Mutual labels:  annotations
serde with
This crate provides custom de/serialization helpers to use in combination with serde's `with`-annotation and with the improved `serde_as`-annotation.
Stars: ✭ 392 (+2205.88%)
Mutual labels:  annotations
amigo
AmiGO is the public interface for the Gene Ontology.
Stars: ✭ 26 (+52.94%)
Mutual labels:  annotations
GdprBundle
A symfony3 bundle to assist with defining data in accordance with GDPR, and for encrypting and reporting.
Stars: ✭ 61 (+258.82%)
Mutual labels:  annotations
young-examples
java学习和项目中一些典型的应用场景样例代码
Stars: ✭ 21 (+23.53%)
Mutual labels:  annotations
DyAnnotationExtractor
DyAnnotationExtractor is software for extracting annotations (highlighted text and comments) from e-documents like PDF.
Stars: ✭ 34 (+100%)
Mutual labels:  annotations
obsidian-hypothesis-plugin
An Obsidian.md plugin that syncs highlights from Hypothesis.
Stars: ✭ 164 (+864.71%)
Mutual labels:  annotations
annotate
Create 3D labelled bounding boxes in RViz
Stars: ✭ 104 (+511.76%)
Mutual labels:  annotations
boost-reflection
This library provides Java-like Reflection API to C++ language.
Stars: ✭ 16 (-5.88%)
Mutual labels:  annotations
hyperion
Experimental framework for working with IIIF in JavaScript and Typescript.
Stars: ✭ 17 (+0%)
Mutual labels:  annotations
protractor-element-extend
Module, that helps you to extend ElementFinder in your own custom fragments
Stars: ✭ 22 (+29.41%)
Mutual labels:  fragments
goat
Annotate Images (or goats) On The Web™
Stars: ✭ 75 (+341.18%)
Mutual labels:  annotations
clothing-detection-ecommerce-dataset
Clothing detection dataset
Stars: ✭ 43 (+152.94%)
Mutual labels:  annotations
grunt-angular-combine
Grunt task for combining AngularJS partials into a single HTML file.
Stars: ✭ 16 (-5.88%)
Mutual labels:  fragments
opzioni
The wanna-be-simplest command line arguments library for C++
Stars: ✭ 29 (+70.59%)
Mutual labels:  arguments

Easy-Fragment-Argument

Buy Me a Coffee at ko-fi.com

This library will help you to pass and receive fragment arguments in easier way


Features

###Support types
String
Boolean(boolean)
Integer(int)
Parcelable
Serializable
More types coming soon

#Download

Gradle:

compile 'com.github.armcha:Easy-Fragment-Argument:0.0.1'

#Usage

Step 1. Use

@Argument

annotation to pass arguments,and name of fragment which will receive arguments

@Argument(FirstFragment.class)
private String name = "Test name";

@Argument(FirstFragment.class)
private User testUser;

Step 2. Create fragment

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        testUser = new User("Google", 123456789, 23);

        Fragment fragment = ArgumentFactory.createFragment(this, new FirstFragment());
        getSupportFragmentManager()
                .beginTransaction()
                .add(R.id.container, fragment)
                .commit();
    }

Step 3. Extend your fragment from

ArgumentFragment

or just override

onAttach

and call

ArgumentFactory.onAttach(this);
@Override
public void onAttach(Context context) {
    super.onAttach(context);
    ArgumentFactory.onAttach(this);
}

Step 4. Declare variable in fragment with

@Argument

annotation

@Argument
private String name;

@Argument
private User testUser;

##NOTE Your variables should have the same name, inside Activity and Fragment

That's all, happy coding :)

Contact

Pull requests are more than welcome. Please fell free to contact me if there is any problem when using the library.

License

  Easy-Fragment-Argument library for Android
  Copyright (c) 2017 Arman Chatikyan (https://github.com/armcha/Easy-Fragment-Argumentw).

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].