3

I'm currently working on a simple navigation drawer + sliding tab.

However, I wanted these a material design on my own app.

Therefore, I have no choice except to get rid off ActionBarSherlock. When in these attempt, I found that 2 types of imports which are as follows:

import com.actionbarsherlock.app.SherlockFragment;
import com.actionbarsherlock.app.SherlockFragmentActivity;

has to be removed too. However, more errors seem to appear after removing it.

So, is there any other type of imports that could replace these 2 above?

Tristan
  • 3,530
  • 3
  • 30
  • 39
Beta Tracks
  • 263
  • 2
  • 5
  • 14

1 Answers1

14

If you're going to use appcompat-v7, I am sure you have support-v4 in your dependencies as well.

You can try replacing

  • com.actionbarsherlock.app.SherlockFragment with android.support.v4.app.Fragment
  • com.actionbarsherlock.app.SherlockFragmentActivity with android.support.v7.app.AppCompatActivity

There are some good advices on migrating from ABS to AppCompat.

Something to note with above examples is that ActionBarActivity is now deprecated and replaced by AppCompatActivity.

Community
  • 1
  • 1
Ye Lin Aung
  • 11,234
  • 8
  • 45
  • 51
  • I was confused as to why we need both android.support.v4 and android.support.v7. I thought each library was complete but that is not the case. In case someone else is wondering this, see this other answer addressing the differences http://stackoverflow.com/questions/18271429/difference-between-android-support-v7-appcompat-and-android-support-v4 – Adam Mendoza Sep 20 '16 at 18:45