Материалы к докладу на AppLive 2020.
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
// add this to your implementation SearchSupportFragment | |
// put avoidSpeechRecognitinCrash() in your fragment before onPause() | |
override fun onPause() { | |
avoidSpeechRecognitinCrash() | |
super.onPause() | |
} | |
// "destroy" may throw java.lang.IllegalArgumentException: Service not registered: android.speech.SpeechRecognizer$Connection@dabd9b8 | |
// do all this mehod's work and wrap "destroy" to try catch | |
// private void releaseRecognizer() { |
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
почти всё - официальные источники | |
https://developer.android.com/guide/topics/ui/look-and-feel/themes | |
https://medium.com/androiddevelopers/android-styling-themes-vs-styles-ebe05f917578 | |
https://medium.com/androiddevelopers/whats-your-text-s-appearance-f3a1729192d | |
https://medium.com/androiddevelopers/android-styling-common-theme-attributes-8f7c50c9eaba | |
https://medium.com/androiddevelopers/android-styling-prefer-theme-attributes-412caa748774 | |
https://medium.com/androiddevelopers/android-styling-themes-overlay-1ffd57745207 | |
https://habr.com/ru/company/redmadrobot/blog/461201/ | |
https://material.io/develop/android/theming/theming-overview | |
https://material.io/design/introduction |
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
Кукис в ответ | |
BlazingWebCookie gF4mESuGqIR8M1SriTXY8crEbGaHy53mf5415G4cqVbb6lQCZ7VtRV5OdEXrfHgS .anilibria.tv / 2018-06-30T11:16:32.000Z 148 | |
Ответ | |
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Just a moment please...</title> | |
<meta name="description" content=""> |
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
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Just a moment please...</title> | |
<meta name="description" content=""> | |
<meta name="robots" content="noindex, nofollow" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300' rel='stylesheet' type='text/css'> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> |
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
class ChatResponse( | |
@SerializedName("chatId") val id: Long, // Очевидно | |
@SerializedName("count") val count: Int?, // Тоже в принципе | |
@SerializedName("lastMessage") val lastMessage: ChatMessageResponse?, // Последнее сообщение, используется в СПИСКЕ чатов. null в чате | |
@SerializedName("messages") val messages: List<ChatMessageResponse>?, // Сообщения в самом чате. null в списке чатов | |
@SerializedName("deletedIds") var deletedIds: List<Long>?, // Массив удаленных сообщений. Составляется относительно lastsync | |
@SerializedName("author") var author: UserResponse? // Юзер, автор чата | |
) | |
class ChatMessageResponse( |
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 ru.istra.rentspec.data.repository.media | |
import android.graphics.Bitmap | |
import android.graphics.BitmapFactory | |
import android.graphics.Matrix | |
import io.reactivex.Completable | |
import io.reactivex.Single | |
import okhttp3.MultipartBody | |
import okhttp3.RequestBody | |
import ru.istra.rentspec.data.entity.media.ImageItem |
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
recyclerView.apply { | |
layoutManager = LinearLayoutManager(context) | |
adapter = this@ParkingVehicleFragment.adapter | |
val swipeHandler = ParkingVehicleItemDelegate.ItemTouchHelperExtensionCallback() | |
ItemTouchHelperExtension(swipeHandler).attachToRecyclerView(recyclerView) | |
} | |
class ItemTouchHelperExtensionCallback : ItemTouchHelperExtension.Callback() { | |
override fun getMovementFlags(recyclerView: RecyclerView?, viewHolder: RecyclerView.ViewHolder?): Int { | |
if (!(viewHolder is ViewHolder)) return 0 |
NewerOlder