Skip to content

Instantly share code, notes, and snippets.

@iamnaran
iamnaran / activity_layout.xml
Last active July 30, 2024 12:55
Layout And RecyclerView Animation Android (Made Simple with XML only)
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layoutAnimation="@anim/layout_animation"
android:orientation="vertical">
</ScrollView>
package com.un4;
import java.util.ArrayList;
/**
* Created by UN4CKN0WL3Z on 23/08/2017.
*/
public class GroceryList {
private ArrayList<String> groceryList = new ArrayList<>();
@strombringer
strombringer / RecyclerViewBottomPaddingLayout.xml
Last active July 25, 2023 00:32
Adding bottom padding to RecyclerView or ListView so the last item is not obscured by a FAB (Android)
<android.support.v7.widget.RecyclerView
...
android:clipToPadding="false"
android:paddingBottom="72dp"
/>
<!--
Button size = 56dp
Margin = 16dp // on tablets 24dp
--------------------------
@HussainDerry
HussainDerry / VolleyMultipartRequest.java
Last active November 20, 2019 15:45
Multipart request for Google's Volley using Square's OkHttp.
import com.android.volley.AuthFailureError;
import com.android.volley.DefaultRetryPolicy;
import com.android.volley.NetworkResponse;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.RetryPolicy;
import com.android.volley.VolleyLog;
import com.android.volley.toolbox.HttpHeaderParser;
import com.squareup.okhttp.Headers;