Skip to content

Commit

Permalink
兼容最低版本到17
Browse files Browse the repository at this point in the history
  • Loading branch information
xuexiangjys committed Jan 16, 2019
1 parent e3159ba commit bd4c02f
Show file tree
Hide file tree
Showing 13 changed files with 149 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,5 @@ protected void onCreate(Bundle savedInstanceState) {

[xuisvg]: https://img.shields.io/badge/XUI-v1.0.0-brightgreen.svg
[xui]: https://github.com/xuexiangjys/XUI
[apisvg]: https://img.shields.io/badge/API-21+-brightgreen.svg
[api]: https://android-arsenal.com/api?level=21
[apisvg]: https://img.shields.io/badge/API-17+-brightgreen.svg
[api]: https://android-arsenal.com/api?level=17
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ dependencies {
implementation 'com.github.clans:fab:1.6.4'

//XUI框架
// implementation project(':xui_lib')
implementation 'com.github.xuexiangjys:XUI:1.0.0'
implementation project(':xui_lib')
// implementation 'com.github.xuexiangjys:XUI:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.8.0'

//工具类
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/java/com/xuexiang/xuidemo/MyApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.app.Application;
import android.content.Context;
import android.support.multidex.MultiDex;

import com.xuexiang.xaop.XAOP;
import com.xuexiang.xaop.util.PermissionUtils;
Expand All @@ -24,6 +25,13 @@
*/
public class MyApp extends Application {

@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
//解决4.x运行崩溃的问题
MultiDex.install(this);
}

@Override
public void onCreate() {
super.onCreate();
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,5 @@ protected void onCreate(Bundle savedInstanceState) {

[xuisvg]: https://img.shields.io/badge/XUI-v1.0.0-brightgreen.svg
[xui]: https://github.com/xuexiangjys/XUI
[apisvg]: https://img.shields.io/badge/API-21+-brightgreen.svg
[api]: https://android-arsenal.com/api?level=21
[apisvg]: https://img.shields.io/badge/API-17+-brightgreen.svg
[api]: https://android-arsenal.com/api?level=17
17 changes: 17 additions & 0 deletions xui_lib/src/main/res/drawable-v17/md_btn_selected.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetBottom="@dimen/md_button_inset_vertical"
android:insetLeft="@dimen/md_button_inset_horizontal"
android:insetRight="@dimen/md_button_inset_horizontal"
android:insetTop="@dimen/md_button_inset_vertical">
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/md_action_corner_radius" />
<solid android:color="@color/md_btn_selected" />
<padding
android:bottom="@dimen/md_button_padding_vertical"
android:left="@dimen/default_md_button_padding_horizontal_phone"
android:right="@dimen/default_md_button_padding_horizontal_phone"
android:top="@dimen/md_button_padding_vertical" />
</shape>
</inset>
17 changes: 17 additions & 0 deletions xui_lib/src/main/res/drawable-v17/md_btn_selected_dark.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetLeft="@dimen/md_button_inset_horizontal"
android:insetTop="@dimen/md_button_inset_vertical"
android:insetRight="@dimen/md_button_inset_horizontal"
android:insetBottom="@dimen/md_button_inset_vertical">
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/md_action_corner_radius" />
<solid android:color="@color/md_btn_selected_dark" />
<padding
android:bottom="@dimen/md_button_padding_vertical"
android:left="@dimen/default_md_button_padding_horizontal_phone"
android:right="@dimen/default_md_button_padding_horizontal_phone"
android:top="@dimen/md_button_padding_vertical" />
</shape>
</inset>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@color/xui_config_color_separator_dark_phone"/>
<item android:drawable="@color/xui_config_color_white" android:bottom="@dimen/xui_list_divider_height_phone"/>
</layer-list>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@color/xui_config_color_separator_dark_phone"/>
<item android:drawable="@color/xui_config_color_background_pressed" android:bottom="@dimen/xui_list_divider_height_phone"/>
</layer-list>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/xui_config_color_separator_dark_phone" />
<item
android:bottom="@dimen/xui_list_divider_height_phone"
android:drawable="@color/xui_config_color_white"
android:top="@dimen/xui_list_divider_height_phone" />
</layer-list>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/xui_config_color_separator_dark_phone" />
<item
android:bottom="@dimen/xui_list_divider_height_phone"
android:drawable="@color/xui_config_color_background_pressed"
android:top="@dimen/xui_list_divider_height_phone" />
</layer-list>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@color/xui_config_color_separator_dark_phone" />
<item android:drawable="@color/xui_config_color_white" android:top="@dimen/xui_list_divider_height_phone"/>
</layer-list>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:drawable="@color/xui_config_color_separator_dark_phone" />
<item android:drawable="@color/xui_config_color_background_pressed" android:top="@dimen/xui_list_divider_height_phone"/>
</layer-list>
5 changes: 3 additions & 2 deletions xui_lib/src/main/res/layout/msv_loading_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
android:gravity="center"
android:orientation="vertical">

<ProgressBar
<com.xuexiang.xui.widget.progress.materialprogressbar.MaterialProgressBar
android:layout_width="?attr/stf_progressbar_size"
android:layout_height="?attr/stf_progressbar_size" />
android:layout_height="?attr/stf_progressbar_size"
android:indeterminate="true" />

<TextView
android:id="@+id/loading_view_tv"
Expand Down

0 comments on commit bd4c02f

Please sign in to comment.