In FragmentPagerAdapters, should I use the FragmentManager with tags, or just a HashMap?
Currently, I have a FragmentPagerAdapter
whose getItem()
method looks like this:
private static String makeFragmentName(int viewId, int index) {
return "android:switcher:" + viewId + ":" + index;
}
@Override
public Fragment getItem(int position) {
String fragmentName = makeFragmentName(R.id.rec_or_gallery_viewpager, position);
Fragment fragment = fm.findFragmentByTag(fragmentName);
Log.i("test_fragment_inst", fragment+"");
if( position == 0 ) {
if(fragment == null) {
fragment = PicmixVideoGalleryChooserFragment.newInstance();
}
} else {
if(fragment == null) {
fragment = PicmixVideoRecordFragment.newInstance();
}
}
return fragment;
}
I was thinking of changing it into this:
private Map<Integer, Fragment> fragmentMap;
public RecordOrGalleryFragmentPagerAdapter(FragmentManager fm) {
super(fm);
this.fm = fm;
fragmentMap = new HashMap<Integer, Fragment>();
}
...
@Override
public Fragment getItem(int position) {
Fragment fragment = fragmentMap.get(position);
Log.i("test_fragment_inst", fragment+"");
if( position == 0 ) {
if(fragment == null) {
fragment = PicmixVideoGalleryChooserFragment.newInstance();
fragmentMap.put(position, fragment);
}
} else {
if(fragment == null) {
fragment = PicmixVideoRecordFragment.newInstance();
fragmentMap.put(position, fragment);
}
}
return fragment;
}
Both do the same thing, basically, so will there be any performance improvements if I use the latter method, or should I just use the former method?
android
add a comment |
Currently, I have a FragmentPagerAdapter
whose getItem()
method looks like this:
private static String makeFragmentName(int viewId, int index) {
return "android:switcher:" + viewId + ":" + index;
}
@Override
public Fragment getItem(int position) {
String fragmentName = makeFragmentName(R.id.rec_or_gallery_viewpager, position);
Fragment fragment = fm.findFragmentByTag(fragmentName);
Log.i("test_fragment_inst", fragment+"");
if( position == 0 ) {
if(fragment == null) {
fragment = PicmixVideoGalleryChooserFragment.newInstance();
}
} else {
if(fragment == null) {
fragment = PicmixVideoRecordFragment.newInstance();
}
}
return fragment;
}
I was thinking of changing it into this:
private Map<Integer, Fragment> fragmentMap;
public RecordOrGalleryFragmentPagerAdapter(FragmentManager fm) {
super(fm);
this.fm = fm;
fragmentMap = new HashMap<Integer, Fragment>();
}
...
@Override
public Fragment getItem(int position) {
Fragment fragment = fragmentMap.get(position);
Log.i("test_fragment_inst", fragment+"");
if( position == 0 ) {
if(fragment == null) {
fragment = PicmixVideoGalleryChooserFragment.newInstance();
fragmentMap.put(position, fragment);
}
} else {
if(fragment == null) {
fragment = PicmixVideoRecordFragment.newInstance();
fragmentMap.put(position, fragment);
}
}
return fragment;
}
Both do the same thing, basically, so will there be any performance improvements if I use the latter method, or should I just use the former method?
android
add a comment |
Currently, I have a FragmentPagerAdapter
whose getItem()
method looks like this:
private static String makeFragmentName(int viewId, int index) {
return "android:switcher:" + viewId + ":" + index;
}
@Override
public Fragment getItem(int position) {
String fragmentName = makeFragmentName(R.id.rec_or_gallery_viewpager, position);
Fragment fragment = fm.findFragmentByTag(fragmentName);
Log.i("test_fragment_inst", fragment+"");
if( position == 0 ) {
if(fragment == null) {
fragment = PicmixVideoGalleryChooserFragment.newInstance();
}
} else {
if(fragment == null) {
fragment = PicmixVideoRecordFragment.newInstance();
}
}
return fragment;
}
I was thinking of changing it into this:
private Map<Integer, Fragment> fragmentMap;
public RecordOrGalleryFragmentPagerAdapter(FragmentManager fm) {
super(fm);
this.fm = fm;
fragmentMap = new HashMap<Integer, Fragment>();
}
...
@Override
public Fragment getItem(int position) {
Fragment fragment = fragmentMap.get(position);
Log.i("test_fragment_inst", fragment+"");
if( position == 0 ) {
if(fragment == null) {
fragment = PicmixVideoGalleryChooserFragment.newInstance();
fragmentMap.put(position, fragment);
}
} else {
if(fragment == null) {
fragment = PicmixVideoRecordFragment.newInstance();
fragmentMap.put(position, fragment);
}
}
return fragment;
}
Both do the same thing, basically, so will there be any performance improvements if I use the latter method, or should I just use the former method?
android
Currently, I have a FragmentPagerAdapter
whose getItem()
method looks like this:
private static String makeFragmentName(int viewId, int index) {
return "android:switcher:" + viewId + ":" + index;
}
@Override
public Fragment getItem(int position) {
String fragmentName = makeFragmentName(R.id.rec_or_gallery_viewpager, position);
Fragment fragment = fm.findFragmentByTag(fragmentName);
Log.i("test_fragment_inst", fragment+"");
if( position == 0 ) {
if(fragment == null) {
fragment = PicmixVideoGalleryChooserFragment.newInstance();
}
} else {
if(fragment == null) {
fragment = PicmixVideoRecordFragment.newInstance();
}
}
return fragment;
}
I was thinking of changing it into this:
private Map<Integer, Fragment> fragmentMap;
public RecordOrGalleryFragmentPagerAdapter(FragmentManager fm) {
super(fm);
this.fm = fm;
fragmentMap = new HashMap<Integer, Fragment>();
}
...
@Override
public Fragment getItem(int position) {
Fragment fragment = fragmentMap.get(position);
Log.i("test_fragment_inst", fragment+"");
if( position == 0 ) {
if(fragment == null) {
fragment = PicmixVideoGalleryChooserFragment.newInstance();
fragmentMap.put(position, fragment);
}
} else {
if(fragment == null) {
fragment = PicmixVideoRecordFragment.newInstance();
fragmentMap.put(position, fragment);
}
}
return fragment;
}
Both do the same thing, basically, so will there be any performance improvements if I use the latter method, or should I just use the former method?
android
android
asked Nov 22 '18 at 10:32
Gensoukyou1337Gensoukyou1337
483414
483414
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Assuming you have the first variant, where you are using FragmentManager
to access Fragments
from the stack. It's possible to retrieve this fragment, if it was created before.
Ex. one screen doesn't have Pager
, but few Fragments
there, later you switched to screen two, where located your FragmentPager
, and you are using previously created Objects
of Fragments
. However, you can do the same with shared Collection
of Fragments
(what I don't recommend you to do).
At the same time, it's just common behavior to locate Collection
of Objects
in Adapter pattern implementation (in your case FragmentPager
and his Adapter
). And there is no performance difference of using one, or another solution.
One more note, you can even simplify Map
to simple Array
. And access to the Fragment
Objects
with their position indexes.
add a comment |
With your approach, it is unsafe to use a Map
to store and retrieve your fragments by position, because they may not survive configuration changes, and may throw unexpected errors such as IllegalStateException
when you attempt to access them later.
Although having tags on fragments seems to be a better choice, but if your adapter is extending to FragmentPagerAdapter
or FragmentStatePagerAdapter
, then it is a bad idea. In that case, you should not be returning old fragments in your getItem
.
Here's a snippet of what FragmentPagerAdapter.instantiateItem
does:
@NonNull
public Object instantiateItem(@NonNull ViewGroup container, int position) {
if (this.mCurTransaction == null) {
this.mCurTransaction = this.mFragmentManager.beginTransaction();
}
long itemId = this.getItemId(position);
String name = makeFragmentName(container.getId(), itemId);
Fragment fragment = this.mFragmentManager.findFragmentByTag(name);
if (fragment != null) {
this.mCurTransaction.attach(fragment);
} else {
fragment = this.getItem(position); // Get new instance of fragment
this.mCurTransaction.add(container.getId(), fragment, makeFragmentName(container.getId(), itemId));
}
if (fragment != this.mCurrentPrimaryItem) {
fragment.setMenuVisibility(false);
fragment.setUserVisibleHint(false);
}
return fragment;
}
It is absolutely clear that you should always return a new instance of fragment in getItem
, or you will end up doing the same thing as instantiateItem
. The ViewPager
uses instantiateItem
to decide how it should render pages, so if it needs a new one, your getItem
better be returning a new instance.
Even when I only use 2 fragments in myViewPager
? Then again, I did notice thatgetItem()
seems to be called when I scroll from the second page to the first.
– Gensoukyou1337
Nov 23 '18 at 7:15
Yes, even if there's only 2 fragments. Most importantly we should implement the adapter right, and avoid interfering the way ViewPager or FragmentPagerAdapter works because that's their design. The only reason I could think of why getItem was called when you scrolled back to first position: the fragment manager couldn't find the fragment, it could be destroyed for some lifecycle reason. Or maybe you can try increasing the offset page count.
– Aaron
Nov 23 '18 at 7:52
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53428946%2fin-fragmentpageradapters-should-i-use-the-fragmentmanager-with-tags-or-just-a%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Assuming you have the first variant, where you are using FragmentManager
to access Fragments
from the stack. It's possible to retrieve this fragment, if it was created before.
Ex. one screen doesn't have Pager
, but few Fragments
there, later you switched to screen two, where located your FragmentPager
, and you are using previously created Objects
of Fragments
. However, you can do the same with shared Collection
of Fragments
(what I don't recommend you to do).
At the same time, it's just common behavior to locate Collection
of Objects
in Adapter pattern implementation (in your case FragmentPager
and his Adapter
). And there is no performance difference of using one, or another solution.
One more note, you can even simplify Map
to simple Array
. And access to the Fragment
Objects
with their position indexes.
add a comment |
Assuming you have the first variant, where you are using FragmentManager
to access Fragments
from the stack. It's possible to retrieve this fragment, if it was created before.
Ex. one screen doesn't have Pager
, but few Fragments
there, later you switched to screen two, where located your FragmentPager
, and you are using previously created Objects
of Fragments
. However, you can do the same with shared Collection
of Fragments
(what I don't recommend you to do).
At the same time, it's just common behavior to locate Collection
of Objects
in Adapter pattern implementation (in your case FragmentPager
and his Adapter
). And there is no performance difference of using one, or another solution.
One more note, you can even simplify Map
to simple Array
. And access to the Fragment
Objects
with their position indexes.
add a comment |
Assuming you have the first variant, where you are using FragmentManager
to access Fragments
from the stack. It's possible to retrieve this fragment, if it was created before.
Ex. one screen doesn't have Pager
, but few Fragments
there, later you switched to screen two, where located your FragmentPager
, and you are using previously created Objects
of Fragments
. However, you can do the same with shared Collection
of Fragments
(what I don't recommend you to do).
At the same time, it's just common behavior to locate Collection
of Objects
in Adapter pattern implementation (in your case FragmentPager
and his Adapter
). And there is no performance difference of using one, or another solution.
One more note, you can even simplify Map
to simple Array
. And access to the Fragment
Objects
with their position indexes.
Assuming you have the first variant, where you are using FragmentManager
to access Fragments
from the stack. It's possible to retrieve this fragment, if it was created before.
Ex. one screen doesn't have Pager
, but few Fragments
there, later you switched to screen two, where located your FragmentPager
, and you are using previously created Objects
of Fragments
. However, you can do the same with shared Collection
of Fragments
(what I don't recommend you to do).
At the same time, it's just common behavior to locate Collection
of Objects
in Adapter pattern implementation (in your case FragmentPager
and his Adapter
). And there is no performance difference of using one, or another solution.
One more note, you can even simplify Map
to simple Array
. And access to the Fragment
Objects
with their position indexes.
answered Nov 22 '18 at 10:46
GensaGamesGensaGames
1,525726
1,525726
add a comment |
add a comment |
With your approach, it is unsafe to use a Map
to store and retrieve your fragments by position, because they may not survive configuration changes, and may throw unexpected errors such as IllegalStateException
when you attempt to access them later.
Although having tags on fragments seems to be a better choice, but if your adapter is extending to FragmentPagerAdapter
or FragmentStatePagerAdapter
, then it is a bad idea. In that case, you should not be returning old fragments in your getItem
.
Here's a snippet of what FragmentPagerAdapter.instantiateItem
does:
@NonNull
public Object instantiateItem(@NonNull ViewGroup container, int position) {
if (this.mCurTransaction == null) {
this.mCurTransaction = this.mFragmentManager.beginTransaction();
}
long itemId = this.getItemId(position);
String name = makeFragmentName(container.getId(), itemId);
Fragment fragment = this.mFragmentManager.findFragmentByTag(name);
if (fragment != null) {
this.mCurTransaction.attach(fragment);
} else {
fragment = this.getItem(position); // Get new instance of fragment
this.mCurTransaction.add(container.getId(), fragment, makeFragmentName(container.getId(), itemId));
}
if (fragment != this.mCurrentPrimaryItem) {
fragment.setMenuVisibility(false);
fragment.setUserVisibleHint(false);
}
return fragment;
}
It is absolutely clear that you should always return a new instance of fragment in getItem
, or you will end up doing the same thing as instantiateItem
. The ViewPager
uses instantiateItem
to decide how it should render pages, so if it needs a new one, your getItem
better be returning a new instance.
Even when I only use 2 fragments in myViewPager
? Then again, I did notice thatgetItem()
seems to be called when I scroll from the second page to the first.
– Gensoukyou1337
Nov 23 '18 at 7:15
Yes, even if there's only 2 fragments. Most importantly we should implement the adapter right, and avoid interfering the way ViewPager or FragmentPagerAdapter works because that's their design. The only reason I could think of why getItem was called when you scrolled back to first position: the fragment manager couldn't find the fragment, it could be destroyed for some lifecycle reason. Or maybe you can try increasing the offset page count.
– Aaron
Nov 23 '18 at 7:52
add a comment |
With your approach, it is unsafe to use a Map
to store and retrieve your fragments by position, because they may not survive configuration changes, and may throw unexpected errors such as IllegalStateException
when you attempt to access them later.
Although having tags on fragments seems to be a better choice, but if your adapter is extending to FragmentPagerAdapter
or FragmentStatePagerAdapter
, then it is a bad idea. In that case, you should not be returning old fragments in your getItem
.
Here's a snippet of what FragmentPagerAdapter.instantiateItem
does:
@NonNull
public Object instantiateItem(@NonNull ViewGroup container, int position) {
if (this.mCurTransaction == null) {
this.mCurTransaction = this.mFragmentManager.beginTransaction();
}
long itemId = this.getItemId(position);
String name = makeFragmentName(container.getId(), itemId);
Fragment fragment = this.mFragmentManager.findFragmentByTag(name);
if (fragment != null) {
this.mCurTransaction.attach(fragment);
} else {
fragment = this.getItem(position); // Get new instance of fragment
this.mCurTransaction.add(container.getId(), fragment, makeFragmentName(container.getId(), itemId));
}
if (fragment != this.mCurrentPrimaryItem) {
fragment.setMenuVisibility(false);
fragment.setUserVisibleHint(false);
}
return fragment;
}
It is absolutely clear that you should always return a new instance of fragment in getItem
, or you will end up doing the same thing as instantiateItem
. The ViewPager
uses instantiateItem
to decide how it should render pages, so if it needs a new one, your getItem
better be returning a new instance.
Even when I only use 2 fragments in myViewPager
? Then again, I did notice thatgetItem()
seems to be called when I scroll from the second page to the first.
– Gensoukyou1337
Nov 23 '18 at 7:15
Yes, even if there's only 2 fragments. Most importantly we should implement the adapter right, and avoid interfering the way ViewPager or FragmentPagerAdapter works because that's their design. The only reason I could think of why getItem was called when you scrolled back to first position: the fragment manager couldn't find the fragment, it could be destroyed for some lifecycle reason. Or maybe you can try increasing the offset page count.
– Aaron
Nov 23 '18 at 7:52
add a comment |
With your approach, it is unsafe to use a Map
to store and retrieve your fragments by position, because they may not survive configuration changes, and may throw unexpected errors such as IllegalStateException
when you attempt to access them later.
Although having tags on fragments seems to be a better choice, but if your adapter is extending to FragmentPagerAdapter
or FragmentStatePagerAdapter
, then it is a bad idea. In that case, you should not be returning old fragments in your getItem
.
Here's a snippet of what FragmentPagerAdapter.instantiateItem
does:
@NonNull
public Object instantiateItem(@NonNull ViewGroup container, int position) {
if (this.mCurTransaction == null) {
this.mCurTransaction = this.mFragmentManager.beginTransaction();
}
long itemId = this.getItemId(position);
String name = makeFragmentName(container.getId(), itemId);
Fragment fragment = this.mFragmentManager.findFragmentByTag(name);
if (fragment != null) {
this.mCurTransaction.attach(fragment);
} else {
fragment = this.getItem(position); // Get new instance of fragment
this.mCurTransaction.add(container.getId(), fragment, makeFragmentName(container.getId(), itemId));
}
if (fragment != this.mCurrentPrimaryItem) {
fragment.setMenuVisibility(false);
fragment.setUserVisibleHint(false);
}
return fragment;
}
It is absolutely clear that you should always return a new instance of fragment in getItem
, or you will end up doing the same thing as instantiateItem
. The ViewPager
uses instantiateItem
to decide how it should render pages, so if it needs a new one, your getItem
better be returning a new instance.
With your approach, it is unsafe to use a Map
to store and retrieve your fragments by position, because they may not survive configuration changes, and may throw unexpected errors such as IllegalStateException
when you attempt to access them later.
Although having tags on fragments seems to be a better choice, but if your adapter is extending to FragmentPagerAdapter
or FragmentStatePagerAdapter
, then it is a bad idea. In that case, you should not be returning old fragments in your getItem
.
Here's a snippet of what FragmentPagerAdapter.instantiateItem
does:
@NonNull
public Object instantiateItem(@NonNull ViewGroup container, int position) {
if (this.mCurTransaction == null) {
this.mCurTransaction = this.mFragmentManager.beginTransaction();
}
long itemId = this.getItemId(position);
String name = makeFragmentName(container.getId(), itemId);
Fragment fragment = this.mFragmentManager.findFragmentByTag(name);
if (fragment != null) {
this.mCurTransaction.attach(fragment);
} else {
fragment = this.getItem(position); // Get new instance of fragment
this.mCurTransaction.add(container.getId(), fragment, makeFragmentName(container.getId(), itemId));
}
if (fragment != this.mCurrentPrimaryItem) {
fragment.setMenuVisibility(false);
fragment.setUserVisibleHint(false);
}
return fragment;
}
It is absolutely clear that you should always return a new instance of fragment in getItem
, or you will end up doing the same thing as instantiateItem
. The ViewPager
uses instantiateItem
to decide how it should render pages, so if it needs a new one, your getItem
better be returning a new instance.
edited Nov 22 '18 at 11:11
answered Nov 22 '18 at 11:03
AaronAaron
1,7031212
1,7031212
Even when I only use 2 fragments in myViewPager
? Then again, I did notice thatgetItem()
seems to be called when I scroll from the second page to the first.
– Gensoukyou1337
Nov 23 '18 at 7:15
Yes, even if there's only 2 fragments. Most importantly we should implement the adapter right, and avoid interfering the way ViewPager or FragmentPagerAdapter works because that's their design. The only reason I could think of why getItem was called when you scrolled back to first position: the fragment manager couldn't find the fragment, it could be destroyed for some lifecycle reason. Or maybe you can try increasing the offset page count.
– Aaron
Nov 23 '18 at 7:52
add a comment |
Even when I only use 2 fragments in myViewPager
? Then again, I did notice thatgetItem()
seems to be called when I scroll from the second page to the first.
– Gensoukyou1337
Nov 23 '18 at 7:15
Yes, even if there's only 2 fragments. Most importantly we should implement the adapter right, and avoid interfering the way ViewPager or FragmentPagerAdapter works because that's their design. The only reason I could think of why getItem was called when you scrolled back to first position: the fragment manager couldn't find the fragment, it could be destroyed for some lifecycle reason. Or maybe you can try increasing the offset page count.
– Aaron
Nov 23 '18 at 7:52
Even when I only use 2 fragments in my
ViewPager
? Then again, I did notice that getItem()
seems to be called when I scroll from the second page to the first.– Gensoukyou1337
Nov 23 '18 at 7:15
Even when I only use 2 fragments in my
ViewPager
? Then again, I did notice that getItem()
seems to be called when I scroll from the second page to the first.– Gensoukyou1337
Nov 23 '18 at 7:15
Yes, even if there's only 2 fragments. Most importantly we should implement the adapter right, and avoid interfering the way ViewPager or FragmentPagerAdapter works because that's their design. The only reason I could think of why getItem was called when you scrolled back to first position: the fragment manager couldn't find the fragment, it could be destroyed for some lifecycle reason. Or maybe you can try increasing the offset page count.
– Aaron
Nov 23 '18 at 7:52
Yes, even if there's only 2 fragments. Most importantly we should implement the adapter right, and avoid interfering the way ViewPager or FragmentPagerAdapter works because that's their design. The only reason I could think of why getItem was called when you scrolled back to first position: the fragment manager couldn't find the fragment, it could be destroyed for some lifecycle reason. Or maybe you can try increasing the offset page count.
– Aaron
Nov 23 '18 at 7:52
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53428946%2fin-fragmentpageradapters-should-i-use-the-fragmentmanager-with-tags-or-just-a%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown