Android – replace actionbarsherlock with appcompat

I am currently developing a simple navigation drawer slide tab

However, I want to design these materials on my own application

Therefore, I have no choice but to get rid of actionbarsherlock. In these attempts, I found two types of imports, as follows:

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

It must be deleted. However, it seems that more errors will appear after deletion

Then, are there other types of imports that can replace the above 2?

resolvent:

If you plan to use appcompat-v7, I believe your dependency also has support-v4

You can try to replace it

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

There are some good suggestions for migrating from ABS to appcompat

> What are the common issues when migrating from ActionBarSherlock to ActionBarCompat? > ActionBarCompat (Part 3): Migrating from ActionBarSherlock > Migrating from ActionBarSherlock to ActionBarCompat

In the above example, it should be noted that actionbaractivity has been deprecated and replaced by appcompatactivity

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>