skip to Main Content

Android Studio – Placing Two elements at the left of and at the right of parent relative layout in android xml

i want to two elements at the left side of relative layout and two elements at the right side of the same relative layout in android xml. i tried like below. it doesn't work. My Xml <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"…

VIEW QUESTION

Android Studio – Lottie Animation is not working and Lottie callback Listener not called in Android

I'm working on Lottie animation in android but Lottie animation callback function is not called. XML file: <com.airbnb.lottie.LottieAnimationView android:layout_width="@dimen/margin_15" android:layout_height="@dimen/margin_15" android:id="@+id/lav_LikeAnim" app:lottie_autoPlay="true" app:lottie_fileName="handshake_lottie.json" app:lottie_loop="false" android:visibility="gone" android:scaleX="2" android:scaleY="2" android:layout_gravity="center" /> Code: After response of liked: try { likeLottieAnim.playAnimation(); likeLottieAnim.setVisibility(View.VISIBLE); iv_like.setVisibility(View.GONE); tv_likes_count.setVisibility(View.GONE);…

VIEW QUESTION

Android Studio – NestedScrollView breaks suggestions in Android Studio

Here is the strange behavior. I have this layout: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" style="@style/AppTheme.FragmentBackground.XXXX.Parent" android:layout_width="match_parent" android:layout_height="match_parent"> <include android:id="@+id/appbar" layout="@layout/layout_appbar" /> <LinearLayout android:layout_width="match_parent" app:layout_constraintTop_toTopOf="parent" android:layout_height="wrap_content"> </LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout> So far, everything seems perfect. Although, if I replace the LinearLayout with…

VIEW QUESTION
Back To Top
Search