Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '23.0.3'
compileSdkVersion 26
buildToolsVersion '26.0.2'

defaultConfig {
applicationId "com.tangxiaolv.telegramgallery.app"
minSdkVersion 14
targetSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
Expand All @@ -20,8 +20,8 @@ android {
}

dependencies {
compile 'com.android.support:appcompat-v7:23.3.0'
// compile project(':telegramgallery')
debugCompile project(path:':telegramgallery',configuration:'debug')
releaseCompile project(path:':telegramgallery',configuration: 'release')
compile 'com.android.support:appcompat-v7:26.1.0'
compile project(':telegramgallery')
// debugCompile project(path: ':telegramgallery', configuration: 'debug')
// releaseCompile project(path: ':telegramgallery', configuration: 'release')
}
18 changes: 10 additions & 8 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.tangxiaolv.telegramgallery.app"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tangxiaolv.telegramgallery.app">

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.NoActionBar">
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.NoActionBar">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="com.tangxiaolv.telegramgallery.GalleryActivity" />

<activity
android:name="com.tangxiaolv.telegramgallery.GalleryActivity"/>
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ public long getItemId(int position) {
public View getView(int position, View convertView, ViewGroup parent) {
ImageView view = new ImageView(MainActivity.this);
view.setScaleType(ImageView.ScaleType.CENTER_CROP);
view.setLayoutParams(new GridView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
256));
view.setLayoutParams(new GridView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 256));
String path = (String) getItem(position);
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inPreferredConfig = Bitmap.Config.ARGB_4444;
Expand All @@ -73,10 +72,12 @@ public View getView(int position, View convertView, ViewGroup parent) {
@Override
public void onClick(View v) {
GalleryConfig config = new GalleryConfig.Build()
.limitPickPhoto(3)
.singlePhoto(false)
.hintOfPick("this is pick hint")
.filterMimeTypes(new String[]{})
.setLimitPickPhoto(9)
.setSinglePhoto(false)
.setHasOriginalPic(true)
.setHasVideo(true)
.setMaxImageSize(1024 * 1024 * 5)
.setMaxVideoTime(8)
.build();
GalleryActivity.openActivity(MainActivity.this, reqCode, config);
}
Expand All @@ -86,7 +87,10 @@ public void onClick(View v) {
@Override
public void onClick(View v) {
GalleryConfig config = new GalleryConfig.Build()
.singlePhoto(true).build();
.setSinglePhoto(true)
.setHasOriginalPic(true)
.setHasVideo(true)
.build();
GalleryActivity.openActivity(MainActivity.this, reqCode, config);
}
});
Expand Down
10 changes: 9 additions & 1 deletion app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<resources>
<resources xmlns:ns1="http://schemas.android.com/tools">

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
Expand All @@ -8,4 +8,12 @@
<item name="colorAccent">@color/colorAccent</item>
</style>

<style name="Theme.Transparent" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:backgroundDimEnabled" ns1:ignore="NewApi">false</item>
</style>
</resources>
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -15,6 +15,7 @@ buildscript {

allprojects {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
}
}
Expand Down
12 changes: 7 additions & 5 deletions telegramgallery/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ ext {
allLicenses = ["Apache-2.0"]
}
android {
compileSdkVersion 25
buildToolsVersion '23.0.3'
compileSdkVersion 26
buildToolsVersion '26.0.2'

defaultConfig {
minSdkVersion 14
targetSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"

ndk {
abiFilters 'armeabi'//,'x86'//, 'armeabi-v7a'//, 'x86'//, 'x86_6 4', 'arm64-v8a'
abiFilters 'armeabi-v7a'//,'x86'//, 'armeabi-v7a'//, 'x86'//, 'x86_6 4', 'arm64-v8a'
}

externalNativeBuild {
Expand All @@ -56,7 +56,7 @@ android {
}
}

publishNonDefault true
//publishNonDefault true
externalNativeBuild {
cmake {
//path 'src/main/cpp/CMakeLists.txt'
Expand All @@ -74,6 +74,8 @@ android {
}

dependencies {
compile 'com.android.support:support-annotations:26.1.0'
compile 'com.googlecode.mp4parser:isoparser:1.0.6'
}

// Place it at the end of the file
Expand Down
4 changes: 0 additions & 4 deletions telegramgallery/src/main/cpp/libyuv/AUTHORS

This file was deleted.

13 changes: 0 additions & 13 deletions telegramgallery/src/main/cpp/libyuv/CMakeLists.txt

This file was deleted.

29 changes: 0 additions & 29 deletions telegramgallery/src/main/cpp/libyuv/LICENSE

This file was deleted.

8 changes: 0 additions & 8 deletions telegramgallery/src/main/cpp/libyuv/LICENSE_THIRD_PARTY

This file was deleted.

24 changes: 0 additions & 24 deletions telegramgallery/src/main/cpp/libyuv/PATENTS

This file was deleted.

32 changes: 0 additions & 32 deletions telegramgallery/src/main/cpp/libyuv/include/libyuv.h

This file was deleted.

Loading