Posted in Android Development

Android Studio Settings

Android Studio Setup Font Style 1.  Apperence Font : Segoe UI semibold 2.  Apperence Font Size : 11px 3. Code Font: Monospaced. 4. Code Font…

Continue Reading... Android Studio Settings
Posted in Android Development

Automatic popping up keyboard on start Activity

android:focusable=”true” android:focusableInTouchMode=”true” add these two line in parent of the Edittext …in example we added into cardview. <androidx.cardview.widget.CardView android:id=”@+id/note_search_layout” android:layout_width=”0dp” android:layout_height=”wrap_content” android:padding=”5dp” app:cardBackgroundColor=”@color/whiteBgcolor” app:cardCornerRadius=”5dp” app:cardElevation=”3dp”…

Continue Reading... Automatic popping up keyboard on start Activity
Posted in Android Development

Android MVVM (JAVA)

1. view ( activity , fragments, adapter etc.) 2. view-model 3. repository (viewmodel collects data from here) 4. model (collect data from web server or…

Continue Reading... Android MVVM (JAVA)
Posted in Android Development

Non Swipeable ViewPager

REF: https://stackoverflow.com/questions/9650265/how-do-disable-paging-by-swiping-with-finger-in-viewpager-but-still-be-able-to-s package com.m27lab.messmanagerpro.app.classes; import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.animation.DecelerateInterpolator; import android.widget.Scroller; import androidx.viewpager.widget.ViewPager; import java.lang.reflect.Field; public class NonSwipeableViewPager extends ViewPager { public…

Continue Reading... Non Swipeable ViewPager
Posted in Android Development

Option menu or Popup menu change background

  Ref: https://stackoverflow.com/questions/21231404/how-to-change-background-color-popup-menu-android/30731151 Add Popup-Menu style to your App-Theme: <style name=”AppTheme” parent=”android:Theme.Light”> <item name=”android:popupMenuStyle”>@style/PopupMenu</item> </style> <style name=”PopupMenu” parent=”@android:style/Widget.PopupMenu”> <item name=”android:popupBackground”>@android:color/white</item> </style>  

Continue Reading... Option menu or Popup menu change background
Posted in Android Development

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()…

Continue Reading... Android Activity Life-cycle
Posted in Android Development

RecycleView steals focus when inside a NestedScrollView

Reference Link: https://stackoverflow.com/questions/36923948/recycleview-steals-focus-when-inside-a-nestedscrollview add this two line of code in parent or root viewgroup: <android.support.v4.widget.NestedScrollView xmlns:android=”http://schemas.android.com/apk/res/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”…

Continue Reading... RecycleView steals focus when inside a NestedScrollView
Posted in Android Development

file was loaded in the wrong encoding android studio windows

Reference Link: https://stackoverflow.com/questions/53249677/android-studio-shows-wrong-file-contents/54509482#54509482 Thanks to the Answer of Asim, I found deleting folder caches fixed the problem for my case (all gradle files in Android…

Continue Reading... file was loaded in the wrong encoding android studio windows
Posted in Android Development Glide

Glide With Drawable

Reference Link: https://stackoverflow.com/questions/33594735/is-it-possible-to-use-glide-to-download-image-to-load-into-a-textview Sample Code: Glide.with(myFragmentOrActivity).load(imageUrl) .into(new CustomTarget(100,100) { @Override public void onResourceReady(@NonNull Drawable resource, @Nullable Transition

Continue Reading... Glide With Drawable
Posted in admob Android Development

Admob Native advanced (Example)

All Admob Example : https://github.com/googleads/googleads-mobile-android-examples Admob Official Doc: https://developers.google.com/admob/android/native/ Github Link: https://github.com/googleads/googleads-mobile-android-examples/tree/master/java/admob/NativeAdvancedExample/   you tube video: https://youtu.be/wENWbEKRfaM   FEED LAYOUT ADD======================================== <?xml version=”1.0″ encoding=”utf-8″?> <com.google.android.gms.ads.formats.UnifiedNativeAdView…

Continue Reading... Admob Native advanced (Example)