Category : view

I have a question about the view animation in Android. Just noticed that the view position is calculated and drawn before the animation happens using: view.animate().apply { translationY(0f) duration = 1000 interpolator = FastOutSlowInInterpolator() } How can I move an object without first seeing a white square drawn view position? Attaching few images, thanks! 1st ..

Read more

I use radioButton in a RecyclerView Adapter. Normally it works properly but When I wrap RadioButton with FrameLayout it not working properly. In this case I can select all radioButton of course this should not happen. xml Code: <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> <FrameLayout android:id="@+id/view_radio_button" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingStart="@dimen/_20sdp" android:background="@drawable/bg_border_line"> <com.google.android.material.radiobutton.MaterialRadioButton android:id="@+id/radiobutton_question" android:layout_width="match_parent" android:layout_height="wrap_content" android:buttonTint="@color/selector_radiobutton" android:padding="@dimen/_16sdp /> </FrameLayout> ..

Read more

Don’t know what the error trying to say … Issue is being raise while running for testing please check and review the files… XML File This is xml file <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginLeft="24dp" android:layout_marginRight="24dp" android:layout_weight="1" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="16dp" android:layout_marginBottom="8dp" android:fontFamily="sans-serif-medium" android:text="Team ..

Read more

heyho I created a xml and included it in another and a weird thing happens. the content of the most upper constraint layout wont get displayed. The constraints get respected, but it’s just empty space within. the preview in the direct xml file shows the constraint layout with context normally, but the xml file that ..

Read more

I have used CameraPreview class provided by one lib, and I have given size (width and height) according to other views. But the CameraPreview does not take actual size , its take more sizes. Following are the code snippets : <RelativeLayout android:id="@+id/ly_preview" android:layout_width="0dp" android:layout_height="0dp" android:visibility="visible" app:layout_constraintBottom_toTopOf="@+id/view1" app:layout_constraintEnd_toStartOf="@+id/view3" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_chainStyle="packed"> <com.streamaxia.android.CameraPreview android:id="@+id/preview" android:layout_width="match_parent" android:layout_height="wrap_content" android:keepScreenOn="true" ..

Read more