Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to modify library file's source code in Android Studio from Gradle dependency

I recently switched from Eclipse to Android Studio and I'm experimenting with PagerSlidingTabStrip library.

Trying to customize the Tab Strip I came across the Triangle Pager Sliding Tab Strip which suggests to modify the source code of the dependency library. How can I modify the source code of a gradle dependency (in this case and in general)? I don't see any available PagerSlidingTabStrip.java in my project.

like image 537
kouretinho Avatar asked Jul 23 '14 09:07

kouretinho


Video Answer


1 Answers

In order for this to work you have to manually copy/paste the code for PagerSlidingTabStrip.java, into a new class in your own package, make changes in that file and use it exactly as before.

Note: if we want to be precise, this "extension" class does not really extend from PagerSlidingTabStrip, it's more of a replacement

like image 81
kouretinho Avatar answered Sep 22 '22 16:09

kouretinho