Using RoboFragment without support library in RoboGuice 2.0

930 views
Skip to first unread message

Marco Serioli

unread,
Oct 10, 2012, 3:58:27 AM10/10/12
to robo...@googlegroups.com
Hi!

Does someone know how to use RoboFragment without support library? Is it possible?

I've read that is needed in the instruction of upgradingo from RoboGuice 1 to 2.. but if someone have some suggestions..

Thank you
Marco

Johnathan Raymond

unread,
Oct 10, 2012, 11:58:31 AM10/10/12
to robo...@googlegroups.com
This is not currently possible.  As I understand it, there are plans in the works to change this, but for now you need the support libs

--
You received this message because you are subscribed to the Google Groups "roboguice" group.
To view this discussion on the web visit https://groups.google.com/d/msg/roboguice/-/y_7_xI-uRfsJ.
To post to this group, send email to robo...@googlegroups.com.
To unsubscribe from this group, send email to roboguice+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/roboguice?hl=en.

Marco Serioli

unread,
Oct 10, 2012, 12:06:24 PM10/10/12
to robo...@googlegroups.com
Ok.. I will use ActionBarSherlok to avoid the problem.

Thank you!
Marco

2012/10/10 Johnathan Raymond <jdr...@gmail.com>

Michael Burton

unread,
Oct 10, 2012, 12:13:40 PM10/10/12
to robo...@googlegroups.com

Manfred Moser

unread,
Oct 10, 2012, 3:37:03 PM10/10/12
to robo...@googlegroups.com
ActionBarSherlock uses the compatibility library as well! What is the
problem you are trying to solve anyway. The compat library is just a
plain pass through on newer platforms..

manfred

Marco Serioli

unread,
Oct 10, 2012, 4:21:55 PM10/10/12
to robo...@googlegroups.com

If I  extend RoboFragment, that uses the Compatibility Library, I have troubles  in implementing ActionBar.TabListener that not uses Compatibility Library..

Now, using ActionBarSherlock I have bypass that problem!

Diligent Labs

unread,
Oct 10, 2012, 4:36:29 PM10/10/12
to robo...@googlegroups.com

SFX sztfg

Diligent Labs

unread,
Oct 10, 2012, 4:36:30 PM10/10/12
to robo...@googlegroups.com

Swdt

Manfred Moser

unread,
Oct 10, 2012, 5:26:39 PM10/10/12
to robo...@googlegroups.com
Good choice. ActionBarSherlock provides a lot of that sort of stuff
for you. Just keep in mind that you are still using the compatibility
library under the hood.. and that is a good thing imho.. unless you
only want to support devices with 3.x +

manfred

Marco Serioli

unread,
Oct 11, 2012, 12:32:07 AM10/11/12
to robo...@googlegroups.com
In fact I do not care versions before 3.0

Only because roboguice use the compatibility library, in order to keep things simple in ActionBar, I used ActionBarSherlock :)

When roboguice no longer require the compatibility library I can avoid using ActionBarSherlock, unless I discover other interesting features of ActionBarSherlock

2012/10/10 Manfred Moser <mos...@gmail.com>

Manfred Moser

unread,
Oct 11, 2012, 2:08:25 AM10/11/12
to robo...@googlegroups.com
In order to avoid the compat library you would have to fork roboguice
and reimplement the robofragment and other classes without the compat
library ... with version <3 at about 50% of the market this is just
not a good idea for many apps.. and the compat library has minimal
overhead..

manfred

Andrew Toulouse

unread,
Oct 11, 2012, 1:44:04 PM10/11/12
to robo...@googlegroups.com
Can you just create your own RoboFragment?

6c6
< import android.support.v4.app.Fragment;
---
> import android.app.Fragment;




--Andy

Manfred Moser

unread,
Oct 11, 2012, 1:44:50 PM10/11/12
to robo...@googlegroups.com
Yes .. you could. But you would also have to remove the others and the
dependency and more..

Andrew Toulouse

unread,
Oct 11, 2012, 1:48:03 PM10/11/12
to robo...@googlegroups.com
% grep -R android.support *                                                                                                  10:45:34
roboguice/src/main/java/roboguice/activity/RoboFragmentActivity.java:import android.support.v4.app.FragmentActivity;
roboguice/src/main/java/roboguice/config/DefaultRoboModule.java:            c = Class.forName("android.support.v4.app.FragmentManager");
roboguice/src/main/java/roboguice/content/RoboAsyncTaskLoader.java:import android.support.v4.content.AsyncTaskLoader;
roboguice/src/main/java/roboguice/content/RoboLoader.java:import android.support.v4.content.Loader;
roboguice/src/main/java/roboguice/fragment/RoboDialogFragment.java:import android.support.v4.app.DialogFragment;
roboguice/src/main/java/roboguice/fragment/RoboFragment.java:import android.support.v4.app.Fragment;
roboguice/src/main/java/roboguice/fragment/RoboListFragment.java:import android.support.v4.app.ListFragment;
roboguice/src/main/java/roboguice/inject/ContextScopedRoboInjector.java:import android.support.v4.app.Fragment;
roboguice/src/main/java/roboguice/inject/FragmentManagerProvider.java:import android.support.v4.app.FragmentActivity;
roboguice/src/main/java/roboguice/inject/FragmentManagerProvider.java:import android.support.v4.app.FragmentManager;
roboguice/src/main/java/roboguice/inject/RoboInjector.java:import android.support.v4.app.Fragment;
roboguice/src/main/java/roboguice/inject/ViewListener.java:            fragmentClass = Class.forName("android.support.v4.app.Fragment");
roboguice/src/main/java/roboguice/inject/ViewListener.java:            fragmentManagerClass = Class.forName("android.support.v4.app.FragmentManager");
roboguice/src/main/java/roboguice/test/shadow/ShadowFragment.java:import android.support.v4.app.Fragment;
roboguice/src/main/java/roboguice/test/shadow/ShadowFragment.java:import android.support.v4.app.FragmentActivity;
roboguice/src/main/java/roboguice/test/shadow/ShadowFragmentActivity.java:import android.support.v4.app.Fragment;
roboguice/src/main/java/roboguice/test/shadow/ShadowFragmentActivity.java:import android.support.v4.app.Fragment.SavedState;
roboguice/src/main/java/roboguice/test/shadow/ShadowFragmentActivity.java:import android.support.v4.app.FragmentActivity;
roboguice/src/main/java/roboguice/test/shadow/ShadowFragmentActivity.java:import android.support.v4.app.FragmentManager;
roboguice/src/main/java/roboguice/test/shadow/ShadowFragmentActivity.java:import android.support.v4.app.FragmentTransaction;
roboguice/src/test/java/roboguice/fragment/FragmentInjectionTest.java:import android.support.v4.app.FragmentActivity;

It *should* be doable, though not using the support library and wanting to use Fragments means cutting off a huge, huge amount of potential users.

--Andy

Reply all
Reply to author
Forward
0 new messages