diff --git a/OsmAnd-telegram/build.gradle b/OsmAnd-telegram/build.gradle index dfd1fed11e..3355892eb1 100644 --- a/OsmAnd-telegram/build.gradle +++ b/OsmAnd-telegram/build.gradle @@ -4,128 +4,134 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 27 + compileSdkVersion 27 + buildToolsVersion "27.0.3" - sourceSets { - main { - manifest.srcFile "AndroidManifest.xml" - jni.srcDirs = [] - jniLibs.srcDirs = ["libs"] - aidl.srcDirs = ["src"] - java.srcDirs = ["src"] - resources.srcDirs = ["src"] - res.srcDirs = ["res"] - } - } + sourceSets { + main { + manifest.srcFile "AndroidManifest.xml" + jni.srcDirs = [] + jniLibs.srcDirs = ["libs"] + aidl.srcDirs = ["src"] + java.srcDirs = ["src"] + resources.srcDirs = ["src"] + res.srcDirs = ["res"] + } + } - defaultConfig { - applicationId "net.osmand.telegram" - minSdkVersion 15 - targetSdkVersion 27 - versionCode 1 - versionCode System.getenv("APK_NUMBER_VERSION") ? System.getenv("APK_NUMBER_VERSION").toInteger() : versionCode - versionName "1.0" - versionName System.getenv("APK_VERSION")? System.getenv("APK_VERSION").toString(): versionName - } + defaultConfig { + applicationId "net.osmand.telegram" + minSdkVersion 15 + targetSdkVersion 27 + versionCode 1 + versionCode System.getenv("APK_NUMBER_VERSION") ? System.getenv("APK_NUMBER_VERSION").toInteger() : versionCode + versionName "1.0" + versionName System.getenv("APK_VERSION") ? System.getenv("APK_VERSION").toString() : versionName + } - flavorDimensions "abi" + flavorDimensions "abi" - productFlavors { - x86 { - dimension "abi" - ndk { - abiFilter "x86" - } - } - armv7 { - dimension "abi" - ndk { - abiFilter "armeabi-v7a" - } - } - arm64 { - dimension "abi" - ndk { - abiFilter "arm64-v8a" - } - } - fat { - dimension "abi" - } - } - signingConfigs { - development { - storeFile file("../keystores/debug.keystore") - storePassword "android" - keyAlias "androiddebugkey" - keyPassword "android" - } + productFlavors { + x86 { + dimension "abi" + ndk { + abiFilter "x86" + } + } + armv7 { + dimension "abi" + ndk { + abiFilter "armeabi-v7a" + } + } + arm64 { + dimension "abi" + ndk { + abiFilter "arm64-v8a" + } + } + fat { + dimension "abi" + } + } + signingConfigs { + development { + storeFile file("../keystores/debug.keystore") + storePassword "android" + keyAlias "androiddebugkey" + keyPassword "android" + } - publishing { - storeFile file("/var/lib/jenkins/osmand_key") - storePassword System.getenv("OSMAND_APK_PASSWORD") - keyAlias "osmand" - keyPassword System.getenv("OSMAND_APK_PASSWORD") - } - } + publishing { + storeFile file("/var/lib/jenkins/osmand_key") + storePassword System.getenv("OSMAND_APK_PASSWORD") + keyAlias "osmand" + keyPassword System.getenv("OSMAND_APK_PASSWORD") + } + } - buildTypes { - debug { - signingConfig signingConfigs.development - applicationIdSuffix ".debug" - } - release { - signingConfig signingConfigs.publishing - } - } + buildTypes { + debug { + signingConfig signingConfigs.development + applicationIdSuffix ".debug" + } + release { + signingConfig signingConfigs.publishing + } + } - - lintOptions { - // use this line to check all rules except those listed - disable 'InvalidPackage' - } + + lintOptions { + // use this line to check all rules except those listed + disable 'InvalidPackage' + } } task downloadTdLibzip { - doLast { - ant.get(src: 'https://core.telegram.org/tdlib/tdlib.zip', dest: 'tdlib.zip', skipexisting: 'true') - ant.unzip(src: 'tdlib.zip', dest: 'tdlib/') - } + doLast { + ant.get(src: 'https://core.telegram.org/tdlib/tdlib.zip', dest: 'tdlib.zip', skipexisting: 'true') + ant.unzip(src: 'tdlib.zip', dest: 'tdlib/') + } } task copyNativeLibs(type: Copy) { - dependsOn downloadTdLibzip - from "tdlib/libtd/src/main/libs" - into "libs" + dependsOn downloadTdLibzip + from "tdlib/libtd/src/main/libs" + into "libs" } -task copyJavaSources(type: Copy) { - dependsOn downloadTdLibzip - from "tdlib/libtd/src/main/java/org/drinkless/td" - into "src/org/drinkless/td" +task copyJavaSources(type: Copy) { + dependsOn downloadTdLibzip + from "tdlib/libtd/src/main/java/org/drinkless/td" + into "src/org/drinkless/td" } task downloadPrebuiltTelegram { - dependsOn downloadTdLibzip, copyNativeLibs, copyJavaSources + dependsOn downloadTdLibzip, copyNativeLibs, copyJavaSources } afterEvaluate { - android.applicationVariants.all { variant -> - variant.javaCompiler.dependsOn(downloadPrebuiltTelegram) - variant.preBuild.dependsOn(downloadPrebuiltTelegram) - } + android.applicationVariants.all { variant -> + variant.javaCompiler.dependsOn(downloadPrebuiltTelegram) + variant.preBuild.dependsOn(downloadPrebuiltTelegram) + } } dependencies { - implementation project(path: ':OsmAnd-java', configuration: 'android') - implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation project(path: ':OsmAnd-java', configuration: 'android') + implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'com.android.support:appcompat-v7:27.1.1' - implementation 'com.android.support:support-annotations:27.1.1' - implementation 'commons-logging:commons-logging-api:1.1' - implementation 'com.android.support:recyclerview-v7:27.1.1' - implementation 'com.vividsolutions:jts-core:1.14.0' + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'com.android.support:design:27.1.1' + implementation 'com.android.support:customtabs:27.1.1' + implementation 'com.android.support:support-annotations:27.1.1' + implementation 'commons-logging:commons-logging-api:1.1' + implementation 'com.android.support:recyclerview-v7:27.1.1' + implementation 'com.vividsolutions:jts-core:1.14.0' + implementation("com.github.HITGIF:TextFieldBoxes:1.4.4") { + exclude group: 'com.android.support' + } } diff --git a/OsmAnd-telegram/res/drawable-hdpi/ic_arrow_back.png b/OsmAnd-telegram/res/drawable-hdpi/ic_arrow_back.png new file mode 100644 index 0000000000..7a975df613 Binary files /dev/null and b/OsmAnd-telegram/res/drawable-hdpi/ic_arrow_back.png differ diff --git a/OsmAnd-telegram/res/drawable-mdpi/ic_arrow_back.png b/OsmAnd-telegram/res/drawable-mdpi/ic_arrow_back.png new file mode 100644 index 0000000000..c14541d3d7 Binary files /dev/null and b/OsmAnd-telegram/res/drawable-mdpi/ic_arrow_back.png differ diff --git a/OsmAnd-telegram/res/drawable-xhdpi/ic_arrow_back.png b/OsmAnd-telegram/res/drawable-xhdpi/ic_arrow_back.png new file mode 100644 index 0000000000..e212ab8f5c Binary files /dev/null and b/OsmAnd-telegram/res/drawable-xhdpi/ic_arrow_back.png differ diff --git a/OsmAnd-telegram/res/drawable-xxhdpi/ic_arrow_back.png b/OsmAnd-telegram/res/drawable-xxhdpi/ic_arrow_back.png new file mode 100644 index 0000000000..1766bbc0ef Binary files /dev/null and b/OsmAnd-telegram/res/drawable-xxhdpi/ic_arrow_back.png differ diff --git a/OsmAnd-telegram/res/drawable/btn_round.xml b/OsmAnd-telegram/res/drawable/btn_round.xml new file mode 100644 index 0000000000..47458a958d --- /dev/null +++ b/OsmAnd-telegram/res/drawable/btn_round.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd-telegram/res/drawable/btn_round_blue.xml b/OsmAnd-telegram/res/drawable/btn_round_blue.xml new file mode 100644 index 0000000000..fb0e06cfb9 --- /dev/null +++ b/OsmAnd-telegram/res/drawable/btn_round_blue.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/OsmAnd-telegram/res/layout/activity_main.xml b/OsmAnd-telegram/res/layout/activity_main.xml index 94c382c0dc..2036b6bcbe 100644 --- a/OsmAnd-telegram/res/layout/activity_main.xml +++ b/OsmAnd-telegram/res/layout/activity_main.xml @@ -1,14 +1,34 @@ - + - + - \ No newline at end of file + + + + + + + \ No newline at end of file diff --git a/OsmAnd-telegram/res/layout/install_osmand_dialog.xml b/OsmAnd-telegram/res/layout/install_osmand_dialog.xml index 4708b4c39a..9d4e60ef21 100644 --- a/OsmAnd-telegram/res/layout/install_osmand_dialog.xml +++ b/OsmAnd-telegram/res/layout/install_osmand_dialog.xml @@ -7,7 +7,7 @@ diff --git a/OsmAnd-telegram/res/layout/login_dialog.xml b/OsmAnd-telegram/res/layout/login_dialog.xml index 2db8deb9b0..ddf957149f 100644 --- a/OsmAnd-telegram/res/layout/login_dialog.xml +++ b/OsmAnd-telegram/res/layout/login_dialog.xml @@ -1,143 +1,234 @@ - + - + - + - + - + - + - +