Advance Android

How to Hide ActionBar and NotificationBar in android

How to Hide ActionBar and NotificationBar in android

Solution: How to disable/hide notification bar at the top which show battery and other things in android. How to Hide ActionBar and NotificationBar in android style.xml <resources> <!– Base application theme. —> <style name=“AppTheme” parent=“Theme.AppCompat.Light.DarkActionBar”> <!– Customize your theme here. —> <item name=“colorPrimary”>@color/colorPrimary</item> <item name=“colorPrimaryDark”>@color/colorPrimaryDark</item> <item name=“colorAccent”>@color/colorAccent</item> <item name=“android:textColor”>@color/colorAccent</item> </style> <style name=“AppTheme.NoActionBar”> <item name=“windowActionBar”>false</item> <item …

How to Hide ActionBar and NotificationBar in android Read More »

Shimmer effect in android app facebook.shimmer

To include Shimmer in your project, add the following dependency:// Gradle dependency on Shimmer for Androiddependencies { implementation ‘com.facebook.shimmer:shimmer:0.5.0’}========================================================Usage in layout————————————————————————–<com.facebook.shimmer.ShimmerFrameLayout android:id=”@+id/shimmer_view_container” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:layout_gravity=”center” android:layout_marginTop=”10dp” android:orientation=”vertical” app:shimmer_duration=”800″> <LinearLayout android:layout_width=”match_parent” android:layout_height=”wrap_content” android:orientation=”vertical”> <include layout=”@layout/data_placeholder_layout” /> <include layout=”@layout/data_placeholder_layout” /> ……………………………. ……………………………. </LinearLayout></com.facebook.shimmer.ShimmerFrameLayout>—————————————————————————-To start shimmer animation, useshimmerLayout = findViewById(R.id.shimmer_layout)shimmerLayout?.startShimmer() ———————————————————- Check this also :- Image libraries for …

Shimmer effect in android app facebook.shimmer Read More »

How to Setup Genymotion in Windows

Setup Genymotion in Windows Source Official Site: GenymotionGenymotion Desktop relies on the use of Oracle VM VirtualBox in the background to virtualize Android operating systems. If you do not already have Oracle VM VirtualBox installed, you will be asked to do so prior to installing Genymotion.To install Genymotion, follow the steps corresponding to your operating system. …

How to Setup Genymotion in Windows Read More »

Speeding Up Android Studio by Maximizing heap size

Speeding Up Android Studio by Maximizing heap size Maximum heap size Source:https://developer.android.com/ By default, Android Studio has a maximum heap size of 1280MB. If you are working on a large project, or your system has a lot of RAM, you can improve performance by increasing the maximum heap size for Android Studio processes, such as …

Speeding Up Android Studio by Maximizing heap size Read More »

How to Rename package in Android Studio

In your Project pane, click on the little gear icon. Uncheck / De-select the Compact Empty Middle Packages option Your package directory will now be broken up in individual directories Individually select each directory you want to rename, and: Right-click it Select Refactor Click on Rename In the Pop-up dialog, click on Rename Package instead of Rename Directory Enter the new name …

How to Rename package in Android Studio Read More »

Retrofit Tutorial SIMPLE GET REQUEST – Android Studio

Retrofit Make sure to require Internet permissions in your AndroidManifest.xml file: <manifest xmlns:android=”http://schemas.android.com/apk/res/android”> <uses-permission android:name=”android.permission.INTERNET” /></manifest> Add the following to your app/build.gradle file: dependencies { implementation ‘com.google.code.gson:gson:2.8.5’ implementation ‘com.squareup.retrofit2:retrofit:2.4.0’ implementation ‘com.squareup.retrofit2:converter-gson:2.4.0’ }

Adding header view to recyclerview with gridlayout manager

Adding header view to recyclerview with gridlayout manager Android Adding header view to recyclerview with gridlayout manager: To add a header to a recyclerview with a gridlayout, first the adapter needs to be told that the header view is the first position – rather than the standard cell used for the content. Next, the layout manager …

Adding header view to recyclerview with gridlayout manager Read More »

Item OffsetDecoration for GridLayoutManager in RecycleView

Item OffsetDecoration Item OffsetDecoration for GridLayoutManager in RecycleView.Following example will help to give equal space to an item in GridLayout. Item OffsetDecoration for GridLayoutManager in RecycleView.Following example will help to give equal space to an item in GridLayout. ItemOffsetDecoration.java public class ItemOffsetDecoration extends RecyclerView.ItemDecoration { private int mItemOffset; private int spanCount = 2; public ItemOffsetDecoration(int …

Item OffsetDecoration for GridLayoutManager in RecycleView Read More »