Skip to content

Commit dc6b6fe

Browse files
author
Jorge Costa
authored
Merge pull request #44 from massivedisaster/feature/documentation
feature/documentation
2 parents 0c88905 + 7cf8748 commit dc6b6fe

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Activity Fragment Manager
22
[![Download](https://api.bintray.com/packages/jmspt/maven/activity-fragment-manager/images/download.svg)](https://bintray.com/jmspt/maven/activity-fragment-manager/)
33
[![Build Status](https://travis-ci.org/massivedisaster/ActivityFragmentManager.svg?branch=master)](https://travis-ci.org/massivedisaster/ActivityFragmentManager)
4-
[![API](https://img.shields.io/badge/API-10%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=10)
5-
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6-
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Activity%20Fragment%20Manager-red.svg?style=flat)](https://android-arsenal.com/details/1/5916)
7-
A library to help android developer working easly with activities and fragments
4+
[![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=16)[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Activity%20Fragment%20Manager-red.svg?style=flat)](https://android-arsenal.com/details/1/5916)
6+
A library to help android developer working easly with activities and fragments
87

98
## Motivation
109

@@ -109,7 +108,7 @@ An example, if your ```AbstractFragmentActivity``` is started by an external int
109108
public class ActivityPrimaryTheme extends AbstractFragmentActivity {
110109

111110
...
112-
111+
113112
@Override
114113
protected Class<? extends Fragment> getDefaultFragment() {
115114
return FragmentSplash.class;
@@ -158,7 +157,7 @@ If you want to add a custom animation for all transactions inside of a ```Abstra
158157
public class ActivityPrimaryTheme extends AbstractFragmentActivity {
159158

160159
...
161-
160+
162161
@Override
163162
public int getAnimationEnter() {
164163
return R.anim.enter_from_right;
@@ -183,8 +182,8 @@ public class ActivityPrimaryTheme extends AbstractFragmentActivity {
183182
```
184183

185184
### 5. Shared Elements
186-
If you want to make your app beautiful you need to put some cool animation on it!
187-
Shared elements are introduce in API 21 and makes the transactions so great and sweet.
185+
If you want to make your app beautiful you need to put some cool animation on it!
186+
Shared elements are introduce in API 21 and makes the transactions so great and sweet.
188187
So, now it's very easy to share elements between fragments or activities.
189188
Let's take a look:
190189

@@ -208,7 +207,7 @@ or
208207
android:transitionName="sharedElement" />
209208
```
210209

211-
**Attention:** Shared elements doesn't work when you use ```add()```!
210+
**Attention:** Shared elements doesn't work when you use ```add()```!
212211
Well if you remove the first fragment it's possible, i.e. a replace :)
213212

214213
### 6. Custom Intents
@@ -219,7 +218,7 @@ Intent intent = ActivityFragmentManager.open(getContext(), ActivityPrimaryTheme.
219218
intent.setFlag(Intent.FLAG_ACTIVITY_NEW_TASK
220219
| intent.FLAG_ACTIVITY_CLEAR_TASK);
221220
getActivity().startActivity(intent);
222-
```
221+
```
223222

224223
### 7. Fragment#OnBackPressed
225224
Allows to have back pressed events in `Fragments`.
@@ -241,6 +240,7 @@ public class FragmentA extends Fragment implements OnBackPressedListener {
241240

242241
* You can pass a tag to be applied in the ```Fragment```.
243242
* You can pass ```REQUEST_CODE``` to the ```startActivityForResult```.
243+
* You can ```addToBackStack```.
244244
* You can pass data between fragments using a ```Bundle```.
245245
* You can get acess to the original ```FragmentTransaction```.
246246
* You can use ```DataBinding``` in your ```AbstractFragmentActivity```, all you need is override ```initializeDataBinding()``` and bind the view!

0 commit comments

Comments
 (0)