Skip to content

Commit 0c88905

Browse files
author
Jorge Costa
authored
Merge pull request #42 from massivedisaster/feature/fix_activity_start
Feature/fix activity start
2 parents ea1ba56 + 436032a commit 0c88905

3 files changed

Lines changed: 12 additions & 34 deletions

File tree

activity-fragment-manager/src/main/java/com/massivedisaster/activitymanager/activity/AbstractFragmentActivity.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@ public void onCreate(Bundle savedInstanceState) {
8888
setContentView(rootView);
8989
initializeDataBinding(rootView);
9090

91-
if (getSupportFragmentManager().getBackStackEntryCount() == 0 && getIntent().hasExtra(ACTIVITY_MANAGER_FRAGMENT)) {
92-
performInitialTransaction(getFragment(getIntent().getStringExtra(ACTIVITY_MANAGER_FRAGMENT)), getFragmentTag());
93-
} else if (getDefaultFragment() != null) {
94-
performInitialTransaction(getFragment(getDefaultFragment().getCanonicalName()), null);
91+
if (getSupportFragmentManager().getFragments().isEmpty() && getSupportFragmentManager().getBackStackEntryCount() == 0) {
92+
if (getIntent().hasExtra(ACTIVITY_MANAGER_FRAGMENT)) {
93+
performInitialTransaction(getFragment(getIntent().getStringExtra(ACTIVITY_MANAGER_FRAGMENT)), getFragmentTag());
94+
} else if (getDefaultFragment() != null) {
95+
performInitialTransaction(getFragment(getDefaultFragment().getCanonicalName()), null);
96+
}
9597
}
9698
}
9799

build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,23 @@ ext {
4343
buildscript {
4444
repositories {
4545
jcenter()
46+
google()
4647
maven {
4748
url "https://plugins.gradle.org/m2/"
4849
}
4950
}
5051
dependencies {
51-
classpath 'com.android.tools.build:gradle:2.3.3'
52-
classpath 'com.novoda:bintray-release:0.3.4'
52+
classpath 'com.android.tools.build:gradle:3.0.0-beta2'
53+
classpath 'com.novoda:bintray-release:0.5.0'
5354
classpath 'pt.simdea.verifier:verifier:3.5.8'
5455
classpath 'gradle.plugin.com.kageiit:lintrules:1.1.2'
5556
}
5657
}
5758

5859
allprojects {
5960
repositories {
60-
maven { url 'https://maven.google.com' }
6161
jcenter()
62+
google()
6263
}
6364
}
6465

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,6 @@
1-
#
2-
# ActivityFragmentManager - A library to help android developer working easily with activities and fragments.
3-
#
4-
# Copyright (c) 2017 ActivityFragmentManager
5-
#
6-
# Permission is hereby granted, free of charge, to any person obtaining
7-
# a copy of this software and associated documentation files (the
8-
# "Software"), to deal in the Software without restriction, including
9-
# without limitation the rights to use, copy, modify, merge, publish,
10-
# distribute, sublicense, and/or sell copies of the Software, and to
11-
# permit persons to whom the Software is furnished to do so, subject to
12-
# the following conditions:
13-
#
14-
# The above copyright notice and this permission notice shall be
15-
# included in all copies or substantial portions of the Software.
16-
#
17-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18-
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19-
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24-
#
25-
26-
#Wed May 31 13:33:17 UTC 2017
1+
#Thu Aug 24 17:03:38 UTC 2017
272
distributionBase=GRADLE_USER_HOME
283
distributionPath=wrapper/dists
294
zipStoreBase=GRADLE_USER_HOME
305
zipStorePath=wrapper/dists
31-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip

0 commit comments

Comments
 (0)