add ad showing test
This commit is contained in:
43
app/src/main/res/drawable/skip_circle_bg.xml
Normal file
43
app/src/main/res/drawable/skip_circle_bg.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#80000000"/>
|
||||
|
||||
<padding
|
||||
android:bottom="5dp"
|
||||
android:left="8dp"
|
||||
android:right="8dp"
|
||||
android:top="5dp"/>
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="45dp"
|
||||
android:bottomRightRadius="45dp"
|
||||
android:topLeftRadius="45dp"
|
||||
android:topRightRadius="45dp"/>
|
||||
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#40000000"/>
|
||||
|
||||
<padding
|
||||
android:bottom="5dp"
|
||||
android:left="8dp"
|
||||
android:right="8dp"
|
||||
android:top="5dp"/>
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="45dp"
|
||||
android:bottomRightRadius="45dp"
|
||||
android:topLeftRadius="45dp"
|
||||
android:topRightRadius="45dp"/>
|
||||
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
44
app/src/main/res/layout/activity_splash.xml
Normal file
44
app/src/main/res/layout/activity_splash.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/white"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_android_eat_js">
|
||||
|
||||
</ImageView>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/ad_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/ad"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/skip_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_margin="16dp"
|
||||
android:background="@drawable/skip_circle_bg"
|
||||
android:gravity="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp"
|
||||
android:visibility="invisible"
|
||||
tools:text="跳过"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
@@ -190,6 +190,13 @@
|
||||
<string name="text_show_layout_bounds">在布局范围中查看</string>
|
||||
<string name="text_more">更多</string>
|
||||
<string name="text_share">分享</string>
|
||||
<string name="format_skip">跳过 %d</string>
|
||||
<string name="text_can_close_ad_in_settings">广告可以在设置中关闭</string>
|
||||
<string name="key_ad_showing_mode">key_ad_showing_mode</string>
|
||||
<string name="text_ad">广告</string>
|
||||
<string name="show_ad">欣赏广告</string>
|
||||
<string name="text_ad_showing_settings">广告显示设置</string>
|
||||
<string name="text_default">Default</string>
|
||||
|
||||
<string-array name="record_control_keys">
|
||||
<item>无</item>
|
||||
@@ -205,4 +212,16 @@
|
||||
<item>KEY_CAMERA</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="ad_showing_mode_keys">
|
||||
<item>默认</item>
|
||||
<item>每天显示一次</item>
|
||||
<item>不显示</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="ad_showing_mode_values">
|
||||
<item>Default</item>
|
||||
<item>OncePerDay</item>
|
||||
<item>Off</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
<item name="windowNoTitle">true</item>
|
||||
|
||||
<item name="windowActionBar">false</item>
|
||||
|
||||
<item name="android:windowBackground">@drawable/background_splash</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
</style>
|
||||
|
||||
<style name="MainToolbarTheme" parent="AppTheme">
|
||||
|
||||
@@ -66,6 +66,17 @@
|
||||
<Preference android:title="@string/text_reset_background"/>
|
||||
</com.stardust.theme.preference.ThemeColorPreferenceCategory>
|
||||
|
||||
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_ad">
|
||||
<Preference android:title="@string/show_ad"/>
|
||||
<com.afollestad.materialdialogs.prefs.MaterialListPreference
|
||||
android:defaultValue="@string/text_default"
|
||||
android:entries="@array/ad_showing_mode_keys"
|
||||
android:entryValues="@array/ad_showing_mode_values"
|
||||
android:key="@string/key_ad_showing_mode"
|
||||
android:title="@string/text_ad_showing_settings"
|
||||
/>
|
||||
</com.stardust.theme.preference.ThemeColorPreferenceCategory>
|
||||
|
||||
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_about">
|
||||
|
||||
<Preference android:title="@string/text_check_update"/>
|
||||
|
||||
Reference in New Issue
Block a user