Slackbot
08/20/2020, 7:04 AMNikola Milovic
08/20/2020, 1:53 PMLilly
08/20/2020, 4:14 PMIn this case, it is #272727 which is a mix of #121212 and #FFFFFF (9%).
I also read this tutorial which helps a lot but he didn't explain how to calculate the colors.
https://blog.prototypr.io/how-to-design-a-dark-theme-for-your-android-app-3daeb264637ebtokyo
08/20/2020, 4:33 PMSusheel
08/20/2020, 8:56 PMBen Butterworth
08/21/2020, 2:55 PMKimJason
08/22/2020, 2:57 PMBen Butterworth
08/23/2020, 12:08 PMsamuel
08/23/2020, 6:04 PMNote: Fragments outlive their views. Make sure you clean up any references to the binding class instance in the fragment’sDoes this mean that usingmethod.onDestroyView()
lazy
as below could potentially leak?
private val binding: SomeXmlViewBinding by lazy {
SomeXmlViewBinding.inflate(layoutInflater)
}
private val button: View by lazy { binding.button }
Julius Marozas
08/23/2020, 9:28 PMKevin
08/24/2020, 7:05 AM<LinearLayout
android:id="@+id/linear_main"
xmlns:android="<http://schemas.android.com/apk/res/android>"
xmlns:tools="<http://schemas.android.com/tools>"
xmlns:app="<http://schemas.android.com/apk/res-auto>"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hello World"
android:textColor="@color/Black01"
/>
/*insert some kind of tag in here to call the id of new_image element from second_file.xml*/
</LinearLayout>
second_file.xml
<LinearLayout
android:id="@+id/linear_second"
xmlns:android="<http://schemas.android.com/apk/res/android>"
xmlns:tools="<http://schemas.android.com/tools>"
xmlns:app="<http://schemas.android.com/apk/res-auto>"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<ImageView
android:id="@+id/new_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/button_image"
/>
</LinearLayout>
do note that the attached code in here is just an simple example code. as i would like to know, if it's possible or not to call only id of textview/imageview from the other xml file, into the main file.Giulio
08/24/2020, 11:19 PMRemon Shehata
08/25/2020, 4:37 PMSlackbot
08/25/2020, 6:12 PMZariApps
08/25/2020, 7:45 PMTony Mykhaylovsky
08/25/2020, 10:52 PMEugene
08/26/2020, 8:42 AMgenovich
08/26/2020, 11:24 AMJohn O'Reilly
08/26/2020, 5:49 PMClassNotFoundException: kotlin.KotlinNothingValueException
- anyone else come across this?mohamadreza jafarzade
08/26/2020, 9:58 PMhenrikhorbovyi
08/27/2020, 2:49 AMjava.lang.AssertionError: Unbound symbols not allowed
Unbound public symbol for public kotlinx.android.synthetic.main.fragment_onboard/view
gowthamgts
08/27/2020, 8:42 AMJakekudur
08/27/2020, 9:03 AMTijs Gobbens
08/27/2020, 9:04 AMprivate val _someData = MutableLiveData<String>()
val someData: LiveData<String> = _someData
Kevin
08/27/2020, 10:30 AMErik
08/27/2020, 10:55 AMLifecycleOwner.lifecycleScope()
. However, there are multiple dependencies related to this example:
androidx.lifecycle:lifecycle-livedata-core-ktx
androidx.lifecycle:lifecycle-livedata-ktx
androidx.lifecycle:lifecycle-reactivestreams-ktx
androidx.lifecycle:lifecycle-runtime-ktx
androidx.lifecycle:lifecycle-viewmodel-ktx
(this particular example is listed here: https://developer.android.com/kotlin/ktx/extensions-list#for_lifecycleowner_2)
👉❓ How can I find out which specific dependency provides this particular feature? ❓👈Will Nixon
08/27/2020, 4:06 PMOleg Siboglov
08/27/2020, 4:48 PMLiveData.observe(...)
function from the lifecycle-livedata-core-ktx
library. Today I noticed that I’m getting a warning from Android Studio in regards to this function call. Anyone know what this is about?
Candidate resolution will be changed soon, please use fully qualified name to invoke the following closer candidate explicitly:
public open fun observe(owner: LifecycleOwner, observer: Observer<in ScreenData!>): Unit defined in androidx.lifecycle.LiveData
Afzal Najam
08/27/2020, 6:09 PMliveData.postValue(StateOne)
2. Call liveData.postValue(StateTwo)
Actual:
The LiveData observer only receives StateTwo
because inside postValue
, while the mPostValueRunnable
is being posted from the first call, pendingData
gets replaced by the second call.
Is that expected or should LiveData be posting two separate runnables, one by one?Junaid Sakib
08/27/2020, 6:14 PMLayoutContainer
for ViewHolder
pattern still in experimental state, actually I am not finding much documentation around it, or maybe I am not looking in the right place?Junaid Sakib
08/27/2020, 6:14 PMLayoutContainer
for ViewHolder
pattern still in experimental state, actually I am not finding much documentation around it, or maybe I am not looking in the right place?flosch
08/28/2020, 9:34 AMViewBinding
instead of kotlin-synthetics
ViewBinding
you do not need to extend the ViewHolder
with anything:
Adapter
override fun onCreateViewHolder(
parent: ViewGroup,
viewType: Int
): SomeViewHolder = SomeViewHolder(
ItemSomeBinding.inflate(LayoutInflater.from(parent.context), parent, false)
)
ViewHolder
internal class SomeViewHolder(
private val binding: ItemSomeBinding
) : RecyclerView.ViewHolder(binding.root) {
fun bind(item: SomeItem) {
binding.textView.text = "${item.id}"
}
}
Junaid Sakib
08/29/2020, 1:44 PM