change the acrionbat color at viewpager activity

This commit is contained in:
tibbi 2016-02-24 23:37:26 +01:00
parent c936517720
commit 7d86d15f00
4 changed files with 20 additions and 7 deletions

View file

@ -27,6 +27,7 @@
<activity <activity
android:name=".activities.ViewPagerActivity" android:name=".activities.ViewPagerActivity"
android:screenOrientation="portrait"/> android:screenOrientation="portrait"
android:theme="@style/FullScreenTheme"/>
</application> </application>
</manifest> </manifest>

View file

@ -11,16 +11,16 @@ import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import com.simplemobiletools.gallery.Constants; import com.simplemobiletools.gallery.Constants;
import com.simplemobiletools.gallery.MyViewPager; import com.simplemobiletools.gallery.MyViewPager;
import com.simplemobiletools.gallery.R; import com.simplemobiletools.gallery.R;
import com.simplemobiletools.gallery.adapters.MyPagerAdapter; import com.simplemobiletools.gallery.adapters.MyPagerAdapter;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
public class ViewPagerActivity extends AppCompatActivity { public class ViewPagerActivity extends AppCompatActivity {
private int pos; private int pos;
private boolean isFullScreen; private boolean isFullScreen;
@ -34,8 +34,8 @@ public class ViewPagerActivity extends AppCompatActivity {
setContentView(R.layout.activity_photo); setContentView(R.layout.activity_photo);
pos = 0; pos = 0;
actionbar = getSupportActionBar();
isFullScreen = true; isFullScreen = true;
actionbar = getSupportActionBar();
hideSystemUI(); hideSystemUI();
final MyPagerAdapter adapter = new MyPagerAdapter(getSupportFragmentManager()); final MyPagerAdapter adapter = new MyPagerAdapter(getSupportFragmentManager());

View file

@ -4,4 +4,5 @@
<color name="colorPrimaryDark">#303F9F</color> <color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color> <color name="colorAccent">#FF4081</color>
<color name="tmb_background">#ff222222</color> <color name="tmb_background">#ff222222</color>
<color name="actionbar_grey">#66000000</color>
</resources> </resources>

View file

@ -6,4 +6,15 @@
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
</style> </style>
<style name="FullScreenTheme" parent="AppTheme">
<item name="android:windowContentOverlay">@null</item>
<item name="actionBarStyle">@style/MyFullScreenActionBar</item>
<item name="android:actionBarStyle">@style/MyFullScreenActionBar</item>
</style>
<style name="MyFullScreenActionBar" parent="@android:style/Widget.Holo.ActionBar">
<item name="background">@color/actionbar_grey</item>
<item name="android:background">@color/actionbar_grey</item>
</style>
</resources> </resources>