Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
likorn
/
vocabulary_notebook
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f984f623
authored
Nov 20, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug with fragments being added twice
parent
51570a31
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
.idea/caches/build_file_checksums.ser
app/build.gradle
app/src/main/java/com/paktalin/vocabularynotebook/utils/ActivityUtil.kt
.idea/caches/build_file_checksums.ser
View file @
f984f623
No preview for this file type
app/build.gradle
View file @
f984f623
...
@@ -10,8 +10,8 @@ android {
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.paktalin.vocabularynotebook"
applicationId
"com.paktalin.vocabularynotebook"
minSdkVersion
15
minSdkVersion
15
targetSdkVersion
28
targetSdkVersion
28
versionCode
2
versionCode
3
versionName
"1.
1
"
versionName
"1.
2
"
multiDexEnabled
true
multiDexEnabled
true
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
vectorDrawables
{
vectorDrawables
{
...
...
app/src/main/java/com/paktalin/vocabularynotebook/utils/ActivityUtil.kt
View file @
f984f623
...
@@ -15,6 +15,9 @@ val progressFragment: Fragment = ProgressFragment()
...
@@ -15,6 +15,9 @@ val progressFragment: Fragment = ProgressFragment()
fun
addFragment
(
fragmentManager
:
FragmentManager
,
fragment
:
Fragment
,
containerId
:
Int
,
arguments
:
Bundle
?)
{
fun
addFragment
(
fragmentManager
:
FragmentManager
,
fragment
:
Fragment
,
containerId
:
Int
,
arguments
:
Bundle
?)
{
fragment
.
arguments
=
arguments
fragment
.
arguments
=
arguments
// remove progressFragment if it exists
if
(
fragmentManager
.
findFragmentById
(
fragment
.
id
)
!=
null
)
removeFragment
(
fragmentManager
,
fragment
)
fragmentManager
.
beginTransaction
().
add
(
containerId
,
fragment
).
commitAllowingStateLoss
()
fragmentManager
.
beginTransaction
().
add
(
containerId
,
fragment
).
commitAllowingStateLoss
()
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment