Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
terrakok committed Mar 28, 2017
2 parents bec8331 + d59e202 commit 2f6f445
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -26,7 +26,7 @@ Add the dependency in your build.gradle:
```groovy
dependencies {
//Cicerone
compile 'ru.terrakok.cicerone:cicerone:X.X'
compile 'ru.terrakok.cicerone:cicerone:X.X.X'
}
```

Expand Down Expand Up @@ -100,6 +100,8 @@ protected void executeCommand(Command command) {
Navigator processes the navigation commands. Usually it is an anonymous class inside the Activity.
Activity provides Navigator to the CommandBuffer in _onResume_ and removes it in _onPause_.

**Attention**: Use _onResumeFragments()_ with FragmentActivity ([more info](https://developer.android.com/reference/android/support/v4/app/FragmentActivity.html#onResume()))

```java
@Override
protected void onResume() {
Expand Down
6 changes: 4 additions & 2 deletions README_RUS.md
Expand Up @@ -16,7 +16,7 @@ Cicerone (_"褔懈-褔械-褉芯虂-薪械"_ - 褍褋褌邪褉. 谐懈写) - 谢械谐泻邪褟 斜懈斜
```groovy
dependencies {
//Cicerone
compile 'ru.terrakok.cicerone:cicerone:X.X'
compile 'ru.terrakok.cicerone:cicerone:X.X.X'
}
```
袠 懈薪懈褑懈邪谢懈蟹懈褉褍泄褌械 斜懈斜谢懈芯褌械泻褍, 薪邪锌褉懈屑械褉, 褌邪泻:
Expand Down Expand Up @@ -88,6 +88,8 @@ protected void executeCommand(Command command) {
Navigator - (薪邪锌褉懈屑械褉) 邪薪芯薪懈屑薪褘泄 泻谢邪褋褋 胁薪褍褌褉懈 Activity, 泻芯褌芯褉褘泄 褉械邪谢懈蟹褍械褌 泻芯屑邪薪写褘 薪邪胁懈谐邪褑懈懈.
Activity 锌褉械写芯褋褌邪胁谢褟械褌 褋胁芯泄 Navigator 写谢褟 CommandBuffer 胁 屑械褌芯写械 _onResume_ 懈 芯褔懈褖邪械褌 胁 _onPause_

**袙薪懈屑邪薪懈械**: 袙 FragmentActivity 褋谢械写褍械褌 懈褋锌芯谢褜蟹芯胁邪褌褜 _onResumeFragments()_. ([锌芯写褉芯斜薪械械](https://developer.android.com/reference/android/support/v4/app/FragmentActivity.html#onResume()))

```java
@Override
protected void onResume() {
Expand All @@ -109,7 +111,7 @@ private Navigator navigator = new Navigator() {
};
```

袧邪胁懈谐邪褌芯褉 薪械 芯斜褟蟹邪薪邪 斜褘褌褜 胁 Activity. 袨薪 屑芯卸械褌 斜褘褌褜 懈 胁薪褍褌褉懈 Fragment'邪, 泻芯褌芯褉褘泄 锌械褉械泻谢褞褔邪械褌 胁薪褍褌褉懈 褋械斜褟 View.
袧邪胁懈谐邪褌芯褉 薪械 芯斜褟蟹邪薪 斜褘褌褜 胁 Activity. 袨薪 屑芯卸械褌 斜褘褌褜 懈 胁薪褍褌褉懈 Fragment'邪, 泻芯褌芯褉褘泄 锌械褉械泻谢褞褔邪械褌 胁薪褍褌褉懈 褋械斜褟 View.

## 袣芯屑邪薪写褘 薪邪胁懈谐邪褌芯褉邪
袛谢褟 斜芯谢褜褕懈薪褋褌胁邪 蟹邪写邪褔 锌褉械写芯褋褌邪胁谢械薪薪褘褏 胁 斜懈斜谢懈芯褌械泻械 泻芯屑邪薪写 写芯谢卸薪芯 褏胁邪褌懈褌褜, 薪芯 懈褏 胁褋械谐写邪 屑芯卸薪芯 写芯锌芯谢薪懈褌褜 褋芯斜褋褌胁械薪薪褘屑懈!
Expand Down
2 changes: 1 addition & 1 deletion library/build.gradle
Expand Up @@ -15,7 +15,7 @@ ext {
bintrayName = 'cicerone'
publishedGroupId = 'ru.terrakok.cicerone'
artifact = 'cicerone'
libraryVersion = '1.2'
libraryVersion = '1.2.1'
gitUrl = 'https://github.com/terrakok/Cicerone'
allLicenses = ['MIT']
}
Expand Down
Expand Up @@ -145,5 +145,6 @@ protected void backToUnexisting() {
* Called if we can't create a screen.
*/
protected void unknownScreen(Command command) {
throw new RuntimeException("Can't create a screen for passed screenKey.");
}
}
Expand Up @@ -144,5 +144,6 @@ protected void backToUnexisting() {
* Called if we can't create a screen.
*/
protected void unknownScreen(Command command) {
throw new RuntimeException("Can't create a screen for passed screenKey.");
}
}
Expand Up @@ -130,8 +130,8 @@ private void initContainers() {
}

@Override
protected void onResume() {
super.onResume();
protected void onResumeFragments() {
super.onResumeFragments();
navigatorHolder.setNavigator(navigator);
}

Expand Down
Expand Up @@ -81,8 +81,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}

@Override
protected void onResume() {
super.onResume();
protected void onResumeFragments() {
super.onResumeFragments();
navigatorHolder.setNavigator(navigator);
}

Expand Down

0 comments on commit 2f6f445

Please sign in to comment.