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
| private fun createClientAuth(): OkHttpClient { | |
| //ADD DISPATCHER WITH MAX REQUEST TO 1 | |
| val dispatcher = Dispatcher() | |
| dispatcher.maxRequests = 1 | |
| val okHttpClientBuilder: OkHttpClient.Builder = OkHttpClient.Builder() | |
| okHttpClientBuilder.dispatcher(dispatcher) | |
| okHttpClientBuilder.addInterceptor(AuthenticationInterceptorRefreshToken(this, UserManager())) | |
| return okHttpClientBuilder.build() | |
| } | |
| } |
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
| interface ApiRefreshToken { | |
| companion object { | |
| private const val REFRESH_TOKEN = "/refreshToken" | |
| } | |
| @FormUrlEncoded | |
| @POST(REFRESH_TOKEN) | |
| fun refreshToken(@Field("refreshToken") refreshToken: String?): Call<TokenModel> | |
| } |
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
| private fun firebaseAuth(loginModelPost: LoginModelPost?,callback: () -> Unit): Either<Failure, Boolean>? { |
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
| Animation Resource - push_down_in.xml | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <set xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <translate android:fromYDelta="-100%p" android:toYDelta="0" android:duration="5000"/> | |
| <alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="5000" /> | |
| </set> | |
| Animation Resource - push_down_out.xml | |
| <?xml version="1.0" encoding="utf-8"?> | |
| <set xmlns:android="http://schemas.android.com/apk/res/android"> |
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
| import android.os.Bundle | |
| import android.view.Gravity | |
| import android.view.LayoutInflater | |
| import android.view.View | |
| import android.view.ViewGroup | |
| import androidx.fragment.app.DialogFragment | |
| import com.timbrit.profesionales.R | |
| import org.jetbrains.anko.sdk27.coroutines.onClick |
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 MainActivity : AppCompatActivity() { | |
| private var selectedView: View? = null | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| requestWindowFeature(Window.FEATURE_NO_TITLE); | |
| getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, | |
| WindowManager.LayoutParams.FLAG_FULLSCREEN); | |
| setContentView(R.layout.activity_main) |
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
| run breaker@{ | |
| collectionModified.forEach { itC -> | |
| when { | |
| !itC.checked && selectedCount >= 3 -> {maxSizeListener(); return@breaker} | |
| else -> { | |
| when { | |
| itC.id == category.id -> { | |
| itC.checked = itemView.switchCategorySelector.isChecked | |
| when { | |
| !itemView.switchCategorySelector.isChecked -> itC.subCategories?.map { it.checked = false } |
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
| when (layoutEditableMode) { | |
| true -> notifyWithAction(message, (R.string.exit), { fun() = activity?.finish() }, circleImageViewProfessionalProfileEditable) | |
| false -> notifyWithAction(message, R.string.refresh, ::loadData, circleImageViewProfessionalProfile) | |
| } |
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
| semicircleHeader?.animate()?.scaleX(1f)?.scaleY(1f)?.setDuration(100)?.start() |
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
| fun foo(){ | |
| myList.any { it -> it.id == valueToCheck } | |
| } |