Prominent app bar with image appears behind status bar

Issue I am using a prominent app bar with an image in a fragment. My style and xml files look like this: theme.xml: <resources xmlns:tools="http://schemas.android.com/tools"> <!– Base application theme. –> <style name="Theme.MainTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar"> <!– Primary brand color. –> <item name="colorPrimary">@color/DeepSkyBlue</item>

Continue reading

this not working in android recycler view adapter Intent

Issue this not working in android recycler view adapter Intent What I Have To Do: Open Activity Onclick On Card And Show Details In The Activity @Override public void onBindViewHolder(@NonNull myviewholder holder, int position) { holder.username.setText(datalist.get(position).getUsername()); holder.email.setText(datalist.get(position).getEmail()); holder.aadhar.setText("Aadhar: "+datalist.get(position).getAadhar()); holder.dob.setText("DOB:

Continue reading

Android resource linking failed in Floating Action button

Issue Android resource linking failed: 208 208 -> <com.google.android.material.floatingactionbutton.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="24dp" android:layout_marginStart="24dp" android:src="@drawable/ic_icon" android:visibility="invisible" app:layout_Gravity="bottom|right|end" app:layout_constraintBottom_toBottomOf="@+id/gridLayout" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@+id/gridLayout" /> build.gradle :-> implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "org.jetbrains.kotlin:kotlin-stdlib:1.6.10" implementation ‘androidx.core:core-ktx:1.3.1’ implementation ‘androidx.appcompat:appcompat:1.2.0’ implementation ‘com.google.android.material:material:1.3.0-alpha02’ implementation ‘androidx.constraintlayout:constraintlayout:2.0.1’ testImplementation

Continue reading

Can't figure out how to use viewbinding in my fragment

Issue I try to implement the following fragment in my app. import android.view.Gravity import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import com.jiangdg.ausbc.base.CameraFragment import com.jiangdg.ausbc.widget.AspectRatioTextureView import com.jiangdg.ausbc.widget.IAspectRatio class DemoFragment : CameraFragment() { private lateinit var mViewBinding: DemoFragmentBinding override fun initView() { super.initView()

Continue reading

CardView: How do I add a gradient background while maintaining the radius

Issue I want to re-create the image below with a CardView. To achieve this, I created a gradient file (btn_gradient.xml) and then proceeded to create the CardView. CardView implementation: <android.support.v7.widget.CardView android:layout_width=”match_parent” android:layout_height=”44dp” android:layout_margin=”25dp” app:cardElevation=”0dp” app:cardCornerRadius=”4dp” app:cardPreventCornerOverlap=”false”> <TextView android:layout_width=”match_parent” android:layout_height=”match_parent” android:gravity=”center”

Continue reading