Reputation: 67
I am creating a demo project for sliding tab with material design. When I am doing like below :
public class MainActivity extends ActionBarActivity { // source code}
It will show red line on "ActionBarActivity". It is not allows for extends. I have follow steps from http://www.exoguru.com/android/material-design/navigation/android-sliding-tabs-with-material-design.html
Any help would be greatly appreciated.
Upvotes: 0
Views: 103
Reputation: 75798
Since the version 22.1.0, the class ActionBarActivity is deprecated. For better approach you should use AppCompatActivity
Just change your dependency,Like :
compile "com.android.support:appcompat-v7:22.1.0"
Upvotes: 1
Reputation: 128448
FYI, ActionBarActivity is deprecated but it should not show red lines, that is an error indication probably due to import! Use AppCompatActivity introduced in support V7 library.
Upvotes: 0