I just implemented a nice ScreenSlide Activity
that swipe between pages both with the user's swipe gesture and with the Next
and Previous
buttons. I did so by attempting to reproduce the behavior of this tutorial.
My problem is that the Next
and Previous
buttons are always shown in the Action Bar, while in the animations of the tutorial they are shown at the bottom of the screen when in Portrait mode, and in the action bar only when in landscape mode.
This is what I want to obtain:
and this is what I get:
my ScreenSlideActivity
:
http://pastie.org/private/zetuetehtvpa1gotn11ua
ScreenSlidePageFragment
:
http://pastie.org/private/eqzt9dw1rc586rqapais2w
activity_screen_slide.xml
:
http://pastie.org/private/vur5e7tz4ldo0fpz47ymbg
frag_info_screen_slide_page.xml
:
http://pastie.org/private/qzmpeavktum4tc5jsg45ww
my Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "madapps.bicitourbo"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/images'] } }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
//Play Services
compile 'com.google.android.gms:play-services-maps:7.5.0'
compile 'com.google.android.gms:play-services-location:7.5.0'
compile 'com.android.support:design:22.2.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.googlecode.objectify:objectify:5.1.5'
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'com.android.support:recyclerview-v7:21.0.3'
}
EDIT
After a great deal of searching I found out that the slide buttons will only go down when the buttons would extend FragmentActivity
and android:theme=@android:style/Theme.Holo.Light.DarkActionBar
is set in the manifest file, whereas apparently there isn't another way to obtain the same result while using the newest AppCompatActivity
, requiring you using Theme.AppCompat.Light
themes instead.
Any help with this issue would be appreciated