Skip to content

Commit

Permalink
优化demo
Browse files Browse the repository at this point in the history
  • Loading branch information
xuexiangjys committed Jun 2, 2018
1 parent 4a39ead commit 7b19619
Show file tree
Hide file tree
Showing 22 changed files with 902 additions and 789 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ buildscript {
classpath deps.android_gradle_plugin
classpath deps.android_maven_gradle_plugin

classpath deps.gradle_bintray_plugin
classpath 'com.github.xuexiangjys.XAOP:xaop-plugin:1.0.1'
// classpath deps.gradle_bintray_plugin
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
9 changes: 7 additions & 2 deletions xvideo-demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
apply plugin: 'com.android.application'
apply plugin: 'com.xuexiang.xaop' //引用xaop插件

android {
compileSdkVersion build_versions.target_sdk
buildToolsVersion build_versions.build_tools

defaultConfig {
applicationId "com.xuexiang.xvideodemo"
minSdkVersion 14
minSdkVersion 19
targetSdkVersion build_versions.target_sdk
versionCode 1
versionName "1.0"
Expand Down Expand Up @@ -57,14 +58,18 @@ dependencies {
androidTestImplementation deps.runner
androidTestImplementation deps.espresso.core
//XUtil
implementation 'com.github.xuexiangjys.XUtil:xutil-core:+'
implementation 'com.github.xuexiangjys.XUtil:xutil-core:1.1.3'
implementation 'com.github.xuexiangjys.XUtil:xutil-sub:1.1.3'
//XPage
implementation 'com.github.xuexiangjys.XPage:xpage-lib:+'
annotationProcessor 'com.github.xuexiangjys.XPage:xpage-compiler:+'
implementation 'com.github.xuexiangjys.XAOP:xaop-runtime:1.0.1'
//butterknife的sdk
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
// implementation project(':xvideo-lib')

implementation 'com.github.xuexiangjys:XVideo:0.0.5'
implementation 'com.github.xuexiangjys:NiceVieoPlayer:3.0.1'
implementation deps.glide
}
17 changes: 4 additions & 13 deletions xvideo-demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,22 @@
android:supportsRtl="true"
android:theme="@style/AppTheme">

<!--<activity android:name=".activity.MainActivity">-->
<!--<intent-filter>-->
<!--<action android:name="android.intent.action.MAIN" />-->

<!--<category android:name="android.intent.category.LAUNCHER" />-->
<!--</intent-filter>-->
<!--</activity>-->

<activity
android:name=".MainActivity"
android:windowSoftInputMode="stateHidden">
<activity android:name=".activity.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".VideoPlayerActivity"
android:name=".activity.VideoPlayerActivity"
android:theme="@style/AppNoBarTheme" />
<activity
android:name="com.xuexiang.xvideo.MediaRecorderActivity"
android:theme="@style/AppNoBarTheme" />
<activity
android:name=".SendSmallVideoActivity"
android:name=".activity.SendSmallVideoActivity"
android:theme="@style/AppNoBarTheme" />

</application>
Expand Down
15 changes: 15 additions & 0 deletions xvideo-demo/src/main/java/com/xuexiang/xvideodemo/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
import android.app.Application;
import android.content.Context;

import com.xuexiang.xaop.XAOP;
import com.xuexiang.xutil.XUtil;
import com.xuexiang.xpage.AppPageConfig;
import com.xuexiang.xpage.PageConfig;
import com.xuexiang.xpage.PageConfiguration;
import com.xuexiang.xpage.model.PageInfo;
import com.xuexiang.xutil.app.PathUtils;
import com.xuexiang.xvideo.XCamera;

import java.util.List;

Expand All @@ -33,12 +36,24 @@ public void onCreate() {
private void initLibs() {
XUtil.init(this);
XUtil.debug(true);
XAOP.init(this);

PageConfig.getInstance().setPageConfiguration(new PageConfiguration() {
@Override
public List<PageInfo> registerPages(Context context) {
return AppPageConfig.getInstance().getPages();
}
}).debug("PageLog").enableWatcher(false).init(this);

initVideo();
}

/**
* 初始化video的存放路径
*/
public static void initVideo() {
XCamera.setVideoCachePath(PathUtils.getExtDcimPath() + "/xvideo/");
// 初始化拍摄
XCamera.initialize(false, null);
}
}
Loading

0 comments on commit 7b19619

Please sign in to comment.