Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
354921dc
Commit
354921dc
authored
Nov 30, 2018
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix loading user fragment from back stack
parent
c84de14a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
6 deletions
+32
-6
app/src/main/java/app/insti/fragment/BodyRecyclerViewFragment.java
...ain/java/app/insti/fragment/BodyRecyclerViewFragment.java
+9
-2
app/src/main/java/app/insti/fragment/EventRecyclerViewFragment.java
...in/java/app/insti/fragment/EventRecyclerViewFragment.java
+9
-2
app/src/main/java/app/insti/fragment/RoleRecyclerViewFragment.java
...ain/java/app/insti/fragment/RoleRecyclerViewFragment.java
+9
-2
app/src/main/java/app/insti/fragment/UserFragment.java
app/src/main/java/app/insti/fragment/UserFragment.java
+5
-0
No files found.
app/src/main/java/app/insti/fragment/BodyRecyclerViewFragment.java
View file @
354921dc
...
...
@@ -26,9 +26,9 @@ import app.insti.api.model.Body;
* Use the {@link BodyRecyclerViewFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public
class
BodyRecyclerViewFragment
extends
Fragment
{
public
class
BodyRecyclerViewFragment
extends
Fragment
implements
TransitionTargetFragment
{
private
static
final
String
TAG
=
"BodyRecyclerViewFragment"
;
public
Fragment
parentFragment
=
null
;
private
RecyclerView
recyclerView
;
private
BodyAdapter
bodyAdapter
;
...
...
@@ -39,6 +39,13 @@ public class BodyRecyclerViewFragment extends Fragment {
// Required empty public constructor
}
@Override
public
void
transitionEnd
()
{
if
(
parentFragment
instanceof
TransitionTargetFragment
)
{
((
TransitionTargetFragment
)
parentFragment
).
transitionEnd
();
}
}
// TODO: Rename and change types and number of parameters
public
static
BodyRecyclerViewFragment
newInstance
(
List
<
Body
>
bodyList
)
{
BodyRecyclerViewFragment
fragment
=
new
BodyRecyclerViewFragment
();
...
...
app/src/main/java/app/insti/fragment/EventRecyclerViewFragment.java
View file @
354921dc
...
...
@@ -25,9 +25,9 @@ import app.insti.api.model.Event;
* Use the {@link EventRecyclerViewFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public
class
EventRecyclerViewFragment
extends
Fragment
{
public
class
EventRecyclerViewFragment
extends
Fragment
implements
TransitionTargetFragment
{
private
static
final
String
TAG
=
"EventRecyclerViewFragment"
;
public
Fragment
parentFragment
=
null
;
private
RecyclerView
recyclerView
;
private
FeedAdapter
feedAdapter
;
...
...
@@ -38,6 +38,13 @@ public class EventRecyclerViewFragment extends Fragment {
// Required empty public constructor
}
@Override
public
void
transitionEnd
()
{
if
(
parentFragment
instanceof
TransitionTargetFragment
)
{
((
TransitionTargetFragment
)
parentFragment
).
transitionEnd
();
}
}
// TODO: Rename and change types and number of parameters
public
static
EventRecyclerViewFragment
newInstance
(
List
<
Event
>
eventList
)
{
EventRecyclerViewFragment
fragment
=
new
EventRecyclerViewFragment
();
...
...
app/src/main/java/app/insti/fragment/RoleRecyclerViewFragment.java
View file @
354921dc
...
...
@@ -23,9 +23,9 @@ import app.insti.api.model.Role;
* Use the {@link RoleRecyclerViewFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public
class
RoleRecyclerViewFragment
extends
Fragment
{
public
class
RoleRecyclerViewFragment
extends
Fragment
implements
TransitionTargetFragment
{
private
static
final
String
TAG
=
"RoleRecyclerViewFragment"
;
public
Fragment
parentFragment
=
null
;
private
RecyclerView
recyclerView
;
private
RoleAdapter
roleAdapter
;
...
...
@@ -36,6 +36,13 @@ public class RoleRecyclerViewFragment extends Fragment {
// Required empty public constructor
}
@Override
public
void
transitionEnd
()
{
if
(
parentFragment
instanceof
TransitionTargetFragment
)
{
((
TransitionTargetFragment
)
parentFragment
).
transitionEnd
();
}
}
// TODO: Rename and change types and number of parameters
public
static
RoleRecyclerViewFragment
newInstance
(
List
<
Role
>
roleList
)
{
RoleRecyclerViewFragment
fragment
=
new
RoleRecyclerViewFragment
();
...
...
app/src/main/java/app/insti/fragment/UserFragment.java
View file @
354921dc
...
...
@@ -184,6 +184,11 @@ public class UserFragment extends BackHandledFragment implements TransitionTarge
RoleRecyclerViewFragment
frag1
=
RoleRecyclerViewFragment
.
newInstance
(
roleList
);
BodyRecyclerViewFragment
frag2
=
BodyRecyclerViewFragment
.
newInstance
(
bodyList
);
EventRecyclerViewFragment
frag3
=
EventRecyclerViewFragment
.
newInstance
(
eventList
);
frag1
.
parentFragment
=
this
;
frag2
.
parentFragment
=
this
;
frag3
.
parentFragment
=
this
;
TabAdapter
tabAdapter
=
new
TabAdapter
(
getChildFragmentManager
());
tabAdapter
.
addFragment
(
frag1
,
"Associations"
);
tabAdapter
.
addFragment
(
frag2
,
"Following"
);
...
...
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