Category : xml

I have this appbar layout; <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white" android:theme="@style/Theme.Kafein.AppBarOverlay"> <LinearLayout android:id="@+id/search" android:layout_width="match_parent" android:layout_height="wrap_content" android:elevation="2dp" android:gravity="center_vertical" android:orientation="vertical" android:translationZ="3dp"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingHorizontal="24dp" android:paddingVertical="16dp"> <ImageView android:layout_width="100dp" android:layout_height="30dp" android:src="@drawable/logo" /> <ImageView android:id="@+id/search_icon" android:layout_width="24dp" android:layout_height="24dp" android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:src="@drawable/icon_search" /> </RelativeLayout> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="16dp" app:layout_scrollFlags="scroll|enterAlways|snap"> <EditText android:id="@+id/top_search" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginHorizontal="24dp" android:background="@drawable/bg_search" android:textColor="@color/gray_dark" android:textColorHint="@color/gray" android:drawableStart="@drawable/icon_search" android:drawablePadding="12dp" android:focusable="false" android:fontFamily="@font/inter" ..

Read more

I’m trying to include shimmer effect in recycler view before images are loaded from firebase but it doesn’t show anything after a few sec the app close,before including shimmer images are loading properly Here is the log when app closes java.lang.NullPointerException: Attempt to invoke virtual method ‘void com.facebook.shimmer.ShimmerFrameLayout.stopShimmer()’ on a null object reference at com.example.myappnotfinal.Fragments.Search.Search_Fragment$1.onDataChange(Search_Fragment.java:60) ..

Read more

I have editText in my layout <EditText android:id="@+id/etMarks1" style="@style/Marks"/> and theme.xml <style name="Marks" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> <item name="android:layout_weight">15</item> <item name="android:ems">1</item> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android:inputType">number</item> <item name="android:textSize">18sp</item> <item name="android:gravity">center</item> </style> The tint line color is black by default and it is changing to white in night mode when I tested in Samsung and Pixel devices (Android ..

Read more

I’m trying to include shimmer effect in recycler view before images are loaded from firebase but it doesn’t show anything, before applying shimmer effect images are showing Java Files Search_Fragment.java // Search Fragment public class Search_Fragment extends Fragment { public List<Upload> mUploads; PostAdapter postsAdapter; @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable ..

Read more

I’m using Android Studio 3.4.2 and trying to implement some basic navigation features in my app. I am following the official documentation to setup a NavHostFragement (via a FragmentContainerView) and linking the appropriate graph to it. However, when I do this, I get an error on the app:navGraph attribute stating: Unexpected resource type: ‘navigation’ expected: ..

Read more