user3510984
user3510984

Reputation: 67

Android Sliding Tabs With Material Design issue

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

Answers (2)

IntelliJ Amiya
IntelliJ Amiya

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

Paresh Mayani
Paresh Mayani

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

Related Questions