Impossible
Это уже в планах, но пока нужно сделать такой вариант рабочим...
Честно говоря, тем что ты хочешь получить вообще не стоит заниматься с твоим текущим стеком возможностей.
0lexiy
Привет 😉 Помогите пожалуйста понять, почему элементы следующие в XML после AppBarLayout игнорят AppBarLayout и отображаются с позиции top = 0, а не с конца AppBarLayout ? Вот XML https://pastebin.com/h5fe73fn
Impossible
Почему?
А смысл? Грош цена твоей оптимизации. Уже есть нормальные готовые решения для таких ситуаций и не стоит ебать мозги в чем-то себя так ограничевая
Vladimir
попробуй забить на retain и глянуть в сторону livedata + viewmodel
Не поможет, лайвдата не даёт возможности восстановить после убийства процесса
Vladimir
Но согласен, что для переворота экрана - да, то что нужно ;)
Impossible
Не поможет, лайвдата не даёт возможности восстановить после убийства процесса
saveInstanceState убийства процесса ты имеешь ввиду полной остановки app ?
Vladimir
При чем тут нужно понимать, в каком случае система может восстановить стейт
Vladimir
Если процесс был убит, то все, Салам алейкум.
Vladimir
Так, ладно, окей, давай по-другому: мне нужно сохранять стейт от смерти процесса. Но у меня retain фрагмент, поэтому сохранять и восстанавливать стейт во время поворота экрана - абсолютно бесполезное дело. Что делать?🤷🏻‍♂️
Мне кажется, вы пытаетесь что-то типа черновика сделать? Так при убийстве сохраняйте данные куда нибудь в базу, и потом оттуда дергайте. Но это такое, оно вам реально нужно? Настолько долго хранить данные формы.
Mike
А не при каждом onSaveInstanceState
в чём проблема делать это при каждом onSaveInstanceState?
Кирилл
в чём проблема делать это при каждом onSaveInstanceState?
Не хочу сохранять и восстанавливать инфу каждый раз, когда даже нет намёков на то, что фрагмент собирается умереть
Mike
Не хочу сохранять и восстанавливать инфу каждый раз, когда даже нет намёков на то, что фрагмент собирается умереть
Тебе нужно выполнить какие-то тяжёлые операции перед тем как сможешь положить данные в бандл?
Ferrero
Класть в бандл это итак O(n!)
Кирилл
Mike
Не совсем, но у меня картинка гоняется в байт-массив и обратно
напиши над ней кастомную реализацию Parcelable
Проксимов
Кто больше?
Кирилл
напиши над ней кастомную реализацию Parcelable
Делал, ругается что превышен размер бандла
Это как
Оп! и положил
Vladimir
Ferrero
O(n?)
Сергей
А за что n!
Кирилл
так, а что ты тогда хочешь?
Уже ничего не хочу.😂
Mike
А за что n!
якобы факториал
Mike
но автор так и не сказал, что имел в виду
Проксимов
n!!
У меня так коммивояжер умер
Ferrero
Байтоблудие
Кирилл
А оно нужно вам? Туда сюда ее гонять?
Ну я пробовал другие варианты, но по-другому ругается на превышение размера. У меня картинки большие, в 2к или 4к могут быть.
Mike
Байтоблудие
ты там объяснишь, что имел в виду?
0lexiy
Привет 😉 Помогите пожалуйста понять, почему элементы следующие в XML после AppBarLayout игнорят AppBarLayout и отображаются с позиции top = 0, а не с конца AppBarLayout ? Вот XML https://pastebin.com/h5fe73fn
Вообщем, сам решил: надо было после AppbarLayout в ScrollView добавить аттрибут app:layout_behavior="android.support.design.widget.AppBarLayout$ScrollingViewBehavior". Всем спасибо за внимание 😆
Ferrero
Да удивлён тому, что не хотят юзать функциональность, которую дал гугл
Ferrero
И ищут какие-то ещё пути
Mike
м, ясно
Кирилл
ну им место в файлах
Угу. Ну в принципе да, надо попробовать рядом хранить и юри
Сергей
И да, вопрос с собечедований - есть ли ограничение у бандла? Примерный правильный ответ - да, где то 25 мб на все приложения и желательно 1-2 маес на одно
Vladimir
И да, вопрос с собечедований - есть ли ограничение у бандла? Примерный правильный ответ - да, где то 25 мб на все приложения и желательно 1-2 маес на одно
Там ограничение не у бандла же, а у того, какого размера можно загонять бандл в стейт, в extras или аргументы фрагмента.
Impossible
Там ограничение не у бандла же, а у того, какого размера можно загонять бандл в стейт, в extras или аргументы фрагмента.
Можно я слегка вопрос обновлю. Как вы собираетесь вообще убить процесс ? Крашнуть чель?
Сергей
It depends on the purpose of the bundle. The bundle itself is only limited by the amount of memory. The two main uses for bundles are to pass information between components using intents and to save the state of activities. 1. Intents / Binders When used to pass information between Android components the bundle is serialized into a binder transaction. The total size for all binder transactions in a process is 1MB. If you exceed this limit you will receive this fatal error "!!! FAILED BINDER TRANSACTION !!!" It's recommend that you keep the data in these bundles as small as possible because it's a shared buffer, anything more than a few kilobytes should be written to disk. Reference:https://android.googlesource.com/platform/frameworks/base/+/jb-release/core/jni/android_util_Binder.cpp ALOGE("!!! FAILED BINDER TRANSACTION !!!"); // TransactionTooLargeException is a checked exception, only throw from certain methods. // FIXME: Transaction too large is the most common reason for FAILED_TRANSACTION // but it is not the only one. The Binder driver can return BR_FAILED_REPLY // for other reasons also, such as if the transaction is malformed or // refers to an FD that has been closed. We should change the driver // to enable us to distinguish these cases in the future. Reference:http://developer.android.com/reference/android/os/TransactionTooLargeException.html The Binder transaction buffer has a limited fixed size, currently 1Mb, which is shared by all transactions in progress for the process. Consequently this exception can be thrown when there are many transactions in progress even when most of the individual transactions are of moderate size. 2. Saved Instance State ( Activity onSaveInstanceState, onPause etc. ) I found no limit in the size I could store in the bundle used to preserve Activity state. I did some tests and could successfully store about 175mb before I received an out of memory exception trying to allocate the data I was attempting to save.
Mike
It depends on the purpose of the bundle. The bundle itself is only limited by the amount of memory. The two main uses for bundles are to pass information between components using intents and to save the state of activities. 1. Intents / Binders When used to pass information between Android components the bundle is serialized into a binder transaction. The total size for all binder transactions in a process is 1MB. If you exceed this limit you will receive this fatal error "!!! FAILED BINDER TRANSACTION !!!" It's recommend that you keep the data in these bundles as small as possible because it's a shared buffer, anything more than a few kilobytes should be written to disk. Reference:https://android.googlesource.com/platform/frameworks/base/+/jb-release/core/jni/android_util_Binder.cpp ALOGE("!!! FAILED BINDER TRANSACTION !!!"); // TransactionTooLargeException is a checked exception, only throw from certain methods. // FIXME: Transaction too large is the most common reason for FAILED_TRANSACTION // but it is not the only one. The Binder driver can return BR_FAILED_REPLY // for other reasons also, such as if the transaction is malformed or // refers to an FD that has been closed. We should change the driver // to enable us to distinguish these cases in the future. Reference:http://developer.android.com/reference/android/os/TransactionTooLargeException.html The Binder transaction buffer has a limited fixed size, currently 1Mb, which is shared by all transactions in progress for the process. Consequently this exception can be thrown when there are many transactions in progress even when most of the individual transactions are of moderate size. 2. Saved Instance State ( Activity onSaveInstanceState, onPause etc. ) I found no limit in the size I could store in the bundle used to preserve Activity state. I did some tests and could successfully store about 175mb before I received an out of memory exception trying to allocate the data I was attempting to save.
2. там просто не было транзакции, т. е. не было смерти процесса. Если бы она была — см. п. 1
Vladimir
It depends on the purpose of the bundle. The bundle itself is only limited by the amount of memory. The two main uses for bundles are to pass information between components using intents and to save the state of activities. 1. Intents / Binders When used to pass information between Android components the bundle is serialized into a binder transaction. The total size for all binder transactions in a process is 1MB. If you exceed this limit you will receive this fatal error "!!! FAILED BINDER TRANSACTION !!!" It's recommend that you keep the data in these bundles as small as possible because it's a shared buffer, anything more than a few kilobytes should be written to disk. Reference:https://android.googlesource.com/platform/frameworks/base/+/jb-release/core/jni/android_util_Binder.cpp ALOGE("!!! FAILED BINDER TRANSACTION !!!"); // TransactionTooLargeException is a checked exception, only throw from certain methods. // FIXME: Transaction too large is the most common reason for FAILED_TRANSACTION // but it is not the only one. The Binder driver can return BR_FAILED_REPLY // for other reasons also, such as if the transaction is malformed or // refers to an FD that has been closed. We should change the driver // to enable us to distinguish these cases in the future. Reference:http://developer.android.com/reference/android/os/TransactionTooLargeException.html The Binder transaction buffer has a limited fixed size, currently 1Mb, which is shared by all transactions in progress for the process. Consequently this exception can be thrown when there are many transactions in progress even when most of the individual transactions are of moderate size. 2. Saved Instance State ( Activity onSaveInstanceState, onPause etc. ) I found no limit in the size I could store in the bundle used to preserve Activity state. I did some tests and could successfully store about 175mb before I received an out of memory exception trying to allocate the data I was attempting to save.
Ну вот. Там же написано что бандл ограничен только размером памяти
Дурний Кіт
1 мб?
Дурний Кіт
я чёт 5 помню
Mike
везде по-разному, где-то и 0,5
Mike
чёт мы стабильно раз в месяц эту тему поднимаем :)
Дурний Кіт
енто да
Anonymous
Привет
Anonymous
Есть ли кто, ставивший twrp на xiaomi?
Mike
Привет
neprivet.ru
Dug
Да можно ж на закреп сразу
Impossible
nometa.xyz
Привета ненавистник
Проксимов
Привета ненавистник
Есть проблемы какие-то?
Impossible
Есть проблемы какие-то?
А тебе сильно нужно?
Anonymous
Понял, столкнулся с такой проблемой, установив twrp: Просит ввести пароль при входе в рекавери, нажимаю назад, и попадаю в меню. Но ничего не могу вшить в системную память, он будто не видит ее, только sd
Проксимов
А тебе сильно нужно?
Мне не нужны, если есть претензии к nometa выскажи в лс
Anonymous
Загрузчик разблокировал
Impossible
Мне не нужны, если есть претензии к nometa выскажи в лс
Это был стеб Quantum Harmonizer, он в плотную игнорит такие сообщения даже в ЛС
Dug
Увидел, извиняюсь
Dug
Но уже ясно, что если тврп поставил, то и бутлодер анлокнул
Anonymous
Сейчас перезагружу телефон, и кину скрин
padmitriy
народ, как сделать чтобы всегда values-en по умолчанию выделен был вместе с values?
padmitriy
И может кто знает, какой самый удобный способ взять и добавить 100500 ресурсов с переводами из хардкода по всему проекту?
Anonymous
Чет не сохраняется скрин, вообщем, кто может знает, что за пароль может стоять? Или стоит просто сброс сделать ещё раз?