-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve annotation & implement shared element transition #40
Open
namkazt
wants to merge
15
commits into
JingYeoh:dev
Choose a base branch
from
namkazt:master
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
66954cb
add close if empty option (1/2)
namkazt 044e377
add close if empty option (2/2)
namkazt 3d8e436
fixup close if empty
namkazt e2d78d6
shared element transaction (2/3)
namkazt 5e7fe18
shared element transaction (1/3)
namkazt 5476616
add fucking `;` missing
namkazt d4a80b6
add missing include
namkazt f150054
shared element transaction (2.5/3)
namkazt 3c26116
shared element transaction (3/3)
namkazt 04b335a
fixup
namkazt 7b1e415
fixups
namkazt 297e351
fixups
namkazt fe2f6e5
fixups
namkazt 250563a
final fixups
namkazt 009499d
Update README.md
namkazt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
fragment-rigger/src/main/java/com/jkb/fragment/rigger/helper/SharedElement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.jkb.fragment.rigger.helper; | ||
|
||
import android.support.v4.view.ViewCompat; | ||
import android.view.View; | ||
|
||
import java.lang.ref.WeakReference; | ||
|
||
public class SharedElement { | ||
public WeakReference<View> referenceView; | ||
public String transactionName; | ||
public static SharedElement create(View refView, String transName){ | ||
SharedElement sharedElement = new SharedElement(); | ||
sharedElement.referenceView = new WeakReference<>(refView); | ||
sharedElement.transactionName = transName; | ||
return sharedElement; | ||
} | ||
public static SharedElement create(View refView){ | ||
return create(refView, ViewCompat.getTransitionName(refView)); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you tried
bondContainerView = true
orstickyStack = true
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes i was but it just not work on my case.
Example: i have main screen with 5 fragments (5 nav menu items) and i using
addFragment
to add it and this method do not add to stack. so when i create new fragment withstartFragment
and after finish i close it. it will checkonBackPress
because my stack = 0 so it close activityi meant the case when you have like 5 fragments on Map ( will not change on app life cycle ) but 0 on stack and you want to keep it when you add and remove other fragment from stack without trigger close() if stack size = 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JustKiddingBaby check
show
demo you will see it close application when you press back button that is something maybe user want to avoidThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@namkazt OK, i got it , thanks for the PR , i will review in weekend and merge it as soon .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@namkazt please change the target branch to dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okey. will fix conflict when have free time.