Commit 2af664df by 郑娜伟

添加demo 测试控件

parent 01221ac0
......@@ -12,7 +12,8 @@ android {
targetSdkVersion 28
versionCode 1
versionName "1.0"
//添加此行
multiDexEnabled true
}
buildTypes {
......@@ -30,8 +31,11 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation project(':sobot_common')
// implementation project(':sobot_widget')
implementation 'com.sobot.library:widget:0.1'
// api 'com.sobot.library:sobotcommon:1.0'
// api 'com.sobot.library:sobotcommon_x:1.0'
......@@ -39,4 +43,7 @@ dependencies {
implementation 'com.sobot.chat:sobotsupport-glidev4:2.1'
implementation 'com.squareup.okhttp3:okhttp:4.4.0'
//添加此行
implementation 'com.android.support:multidex:1.0.3'
}
\ No newline at end of file
......@@ -11,10 +11,12 @@ import com.sobot.common.ui.base.SobotBaseActivity;
import com.sobot.common.ui.toast.SobotToastUtil;
import com.sobot.common.utils.SobotCommonApi;
import com.sobot.common.utils.SobotImageUtils;
import com.sobot.network.http.HttpUtils;
import com.sobot.network.http.db.SobotDownloadManager;
import com.sobot.pictureframe.SobotBitmapUtil;
import com.sobot.utils.SobotLogUtils;
import com.sobot.widget.refresh.layout.api.RefreshLayout;
import com.sobot.widget.refresh.layout.footer.ClassicsFooter;
import com.sobot.widget.refresh.layout.header.ClassicsHeader;
import java.util.HashMap;
import java.util.Map;
......@@ -76,6 +78,11 @@ public class MainActivity extends SobotBaseActivity {
// selectPicFromLocal();
// selectVedioFromLocal();
// openCamera();
RefreshLayout refreshLayout = (RefreshLayout)findViewById(R.id.refreshLayout);
refreshLayout.setRefreshHeader(new ClassicsHeader(this));
refreshLayout.setRefreshFooter(new ClassicsFooter(this));
refreshLayout.setEnableLoadMore(false);
}
@Override
......
package com.sobot.moduletest;
import android.app.Application;
import android.support.multidex.MultiDex;
import com.sobot.common.ui.SobotMarkConfig;
import com.sobot.common.utils.SobotCommonApi;
......@@ -17,11 +18,13 @@ public class MyApp extends Application {
@Override
public void onCreate() {
super.onCreate();
// 主要是添加下面这句代码
MultiDex.install(this);
SobotCommonApi.init(this);
SobotCommonApi.setShowLogDebug(true);
SobotCommonApi.setSwitchMarkStatus(SobotMarkConfig.LANDSCAPE_SCREEN,true);
SobotCommonApi.setSwitchMarkStatus(SobotMarkConfig.DISPLAY_INNOTCH,true);
SobotCommonApi.setSwitchMarkStatus(SobotMarkConfig.LANDSCAPE_SCREEN,false);
SobotCommonApi.setSwitchMarkStatus(SobotMarkConfig.DISPLAY_INNOTCH,false);
}
}
\ No newline at end of file
......@@ -7,4 +7,15 @@
<color name="sobot_status_bar_color">#FF4081</color>
<color name="sobot_color_title_bar_bg">#FF4081</color>
<!-- &lt;!&ndash;下拉刷新 标题文字颜色&ndash;&gt;-->
<!-- <color name="sobot_refresh_text_color">#303F9F</color>-->
<!-- &lt;!&ndash;下拉刷新 更新时间文字颜色&ndash;&gt;-->
<!-- <color name="sobot_refresh_text2_color">#303F9F</color>-->
<!-- &lt;!&ndash;下拉刷新 背景颜色&ndash;&gt;-->
<!-- <color name="sobot_refresh_bg_color">@color/sobot_white</color>-->
<!-- &lt;!&ndash;下拉刷新 箭头控件颜色 &ndash;&gt;-->
<!-- <color name="sobot_refresh_arrow_color">#FF4081</color>-->
<!-- &lt;!&ndash;下拉刷新 加载中 旋转控件颜色&ndash;&gt;-->
<!-- <color name="sobot_refresh_progress_color">#FF4081</color>-->
</resources>
\ No newline at end of file
<resources>
<string name="app_name">Sobot_module_Dev</string>
<!-- <string name="sobot_srl_header_pulling">下拉可以刷新111</string>-->
<!-- <string name="sobot_srl_header_refreshing">正在刷新111…</string>-->
<!-- <string name="sobot_srl_header_loading">正在加载111…</string>-->
<!-- <string name="sobot_srl_header_release">释放立即刷新111</string>-->
<!-- <string name="sobot_srl_header_finish">刷新完成111</string>-->
<!-- <string name="sobot_srl_header_failed">刷新失败</string>-->
<!-- <string name="sobot_srl_header_update">上次更新111 M-d HH:mm</string>-->
<!-- <string name="sobot_srl_header_secondary">释放进入二楼111</string>-->
<!-- <string name="sobot_srl_footer_pulling">上拉加载更多111</string>-->
<!-- <string name="sobot_srl_footer_release">释放立即加载111</string>-->
<!-- <string name="sobot_srl_footer_loading">正在加载111…</string>-->
<!-- <string name="sobot_srl_footer_refreshing">正在刷新111…</string>-->
<!-- <string name="sobot_srl_footer_finish">加载完成111</string>-->
<!-- <string name="sobot_srl_footer_failed">加载失败111</string>-->
<!-- <string name="sobot_srl_footer_nothing">没有更多数据了111</string>-->
</resources>
\ No newline at end of file
......@@ -3,6 +3,7 @@ include ':sobot_network'
include ':sobot_utils'
include ':sobot_gson'
include ':sobot_common'
include ':sobot_widget'
include ':app'
rootProject.name = "Sobot_module_Dev"
......@@ -8,6 +8,21 @@ android {
defaultConfig {
minSdkVersion 14
}
//这里就是打jar包
task makeJar(type: Copy) {
//删除旧的jar包
delete 'build/libs/sobot_gson_1.1.jar'
//原地址
from('build/intermediates/packaged-classes/release/')
//导出jar包的地址
into('build/libs/')
//包含的jar包
include('classes.jar')
//重命名jar包为mysdk
rename ('classes.jar', 'sobot_gson_1.1.jar')
}
makeJar.dependsOn(build)
}
dependencies {
......
package com.sobot.gson;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment