Month: December 2019

Android Activity Life-cycle

First opens Activity: onCreate(),OnStart(),onResume() User Clicks backButton(): onPause(),onStop(),onDestroy() Navigating to another screen: First Screen:: onPause(),onStop() Second Screen: onCreate(),OnStart(),onResume() Presses Backbutton in Activity2: Second Screen: onPause(),onStop() ,onDestroy() First Screen: onRestart(), onStart(), onResume() User locks the device: onPause(),onStop() Again Opens lock: onRestart(), onStart(), onResume()

RecycleView steals focus when inside a NestedScrollView

Reference Link: add this two line of code in parent or root viewgroup: < xmlns:android=”” android:layout_width=”match_parent” android:layout_height=”match_parent””> <LinearLayout android:layout_width=”match_parent” android:layout_height=”match_parent” android:focusableInTouchMode=”true” android:orientation=”vertical”> <View android:id=”@+id/someView” android:layout_width=”wrap_content” android:layout_height=”350dp”/> < android:id=”@+id/recyclerView” android:layout_width=”match_parent” android:layout_height=”wrap_content”/> </LinearLayout> </>

file was loaded in the wrong encoding android studio windows

Reference Link: Thanks to the Answer of Asim, I found deleting folder caches fixed the problem for my case (all gradle files in Android Studio show contents that have nothing to do with the actual contents of these files): Delete caches folder.then you are good to go. C:\Users\my_user_name\.AndroidStudio3.3\system\caches