This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
android:shape="rectangle"> | |
<solid android:color="@color/font_color" /> | |
<corners android:radius="4dp" /> | |
</shape> |
This file contains 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
package com.vk.android.base | |
import android.app.Application | |
import androidx.lifecycle.AndroidViewModel | |
import androidx.lifecycle.LiveData | |
import androidx.lifecycle.MutableLiveData | |
import com.vk.android.network.ApiService | |
import com.vk.android.utils.EventMsg | |
import io.reactivex.disposables.CompositeDisposable | |
import java.lang.ref.WeakReference |
This file contains 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
package com.vk.android.databinding | |
import android.view.View | |
import android.widget.EditText | |
import android.widget.ImageView | |
import androidx.databinding.BindingAdapter | |
import com.bumptech.glide.Glide | |
import com.vk.android.BuildConfig | |
import com.vk.android.R |
This file contains 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
package com.vk.android.helper | |
import android.content.Context | |
import android.content.SharedPreferences | |
class PreferenceHelper private constructor(context: Context) { | |
private val sharedPref: SharedPreferences = context.getSharedPreferences(context.packageName + ".PREFERENCE", Context.MODE_PRIVATE) | |
This file contains 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
package com.vk.android.network | |
import com.vk.android.BuildConfig | |
import io.reactivex.Observable | |
import okhttp3.OkHttpClient | |
import okhttp3.logging.HttpLoggingInterceptor | |
import retrofit2.Retrofit | |
import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory | |
import retrofit2.converter.gson.GsonConverterFactory |
This file contains 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
package com.vk.android.utils | |
import androidx.lifecycle.Observer | |
open class EventMsg<out T>(private val content: T) { | |
var hasBeenHandled = false | |
private set // Allow external read but not write | |
fun getContentIfNotHandled(): T? { |
This file contains 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
package com.vk.android.utils | |
import android.app.Application | |
import android.content.Context | |
import androidx.multidex.MultiDex | |
class VkApplication : Application() { | |
private val TAG = this.javaClass.simpleName | |
override fun onCreate() { | |
super.onCreate() |
This file contains 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
package com.vk.android.extension | |
import android.util.Log | |
import com.vk.android.BuildConfig | |
inline fun <reified T : Any> T.logD(text: String) { | |
if (BuildConfig.DEBUG) | |
Log.d(T::class.java.simpleName, text) | |
} |
This file contains 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
package com.vk.android.extension | |
import com.vk.android.utils.Const | |
import io.reactivex.Observable | |
import io.reactivex.functions.BiFunction | |
import retrofit2.HttpException | |
import java.io.IOException | |
import java.io.InterruptedIOException | |
import java.net.SocketTimeoutException | |
import java.util.concurrent.TimeUnit |
This file contains 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
package com.vk.android.extension | |
import android.content.Context | |
import android.os.Build | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.appcompat.content.res.AppCompatResources | |
import androidx.core.content.ContextCompat |
OlderNewer