This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val textInputLayouts = arrayOf( | |
tilFirstName, | |
tilLastName, | |
tilEmail, | |
tilPhone, | |
tilYear, | |
tilDob, | |
tilPassword, | |
tilConfirmPassword) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tilFirstName.onReady = { observable -> | |
disposable = observable.subscribe { isValid -> | |
btnSignIn.isEnabled = isValid | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<com.kucherenko.RxValidationTextInputLayout | |
android:id="@+id/tilFirstName" | |
style="@style/TextInputLayout.Counter" | |
android:layout_marginTop="@dimen/margin_l" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
app:layout_constraintTop_toBottomOf="parent" | |
app:help="at least 3 letters" | |
app:error="@string/invalid_first_name" | |
app:errorTextAppearance="@style/TextAppearance.AppCompat.Small.Error" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AdapterSingleSelectionDelegate<T>(val datasource: List<T>, val itemChanged: (position: Int) -> Unit, val isAutoSelectFirst: Boolean = false) { | |
private var selectedPositionCurrent = if (isAutoSelectFirst) 0 else -1 | |
private var selectedPositionPrevious = 0 | |
fun selectPosition(position: Int) { | |
val temp = selectedPositionCurrent | |
selectedPositionCurrent = position | |
if (temp != -1) | |
itemChanged(temp) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern "C" | |
JNIEXPORT jint JNICALL | |
Java_com_kucherenkoihor_vpl_VideoProcessing_getDuration( | |
JNIEnv *env, | |
jobject /* this */, | |
jstring input) { | |
av_register_all(); | |
AVFormatContext* pFormatCtx = NULL; | |
if (avformat_open_input(&pFormatCtx, jStr2str(env, input), NULL, NULL) < 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repositories { | |
jcenter() | |
maven { url "https://jitpack.io" } | |
} | |
compile 'com.github.KucherenkoIhor:VideoProcessingLibrary:master-SNAPSHOT' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_library( # Sets the name of the library. | |
vpl | |
# Sets the library as a shared library. | |
SHARED | |
# Provides a relative path to your source file(s). | |
src/main/cpp/vpl.cpp) | |
target_link_libraries( # Specifies the target library. | |
vpl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ndk { | |
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set(ffmpeg_DIR ${CMAKE_SOURCE_DIR}/src/main/cpp/ffmpeg) | |
add_library(avutil-55 SHARED IMPORTED) | |
set_target_properties(avutil-55 PROPERTIES IMPORTED_LOCATION | |
${ffmpeg_DIR}/lib/${ANDROID_ABI}/libavutil-55.so) | |
add_library(avformat-57 SHARED IMPORTED) | |
set_target_properties(avformat-57 PROPERTIES IMPORTED_LOCATION | |
${ffmpeg_DIR}/lib/${ANDROID_ABI}/libavformat-57.so) | |
add_library(avcodec-57 SHARED IMPORTED) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sourceSets { | |
main { | |
// let gradle pack the shared library into apk | |
jniLibs.srcDirs = ['src/main/cpp/ffmpeg/lib'] | |
} | |
} |