Skip to content

Instantly share code, notes, and snippets.

View mert-aydin's full-sized avatar

Mert Aydın mert-aydin

  • İstanbul, Turkey
View GitHub Profile
@johnwatsondev
johnwatsondev / DividerItemDecoration.java
Last active November 30, 2022 07:48
Customizing the DividerItemDecoration class so we can remove divider / decorator after the last item
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@guuilp
guuilp / MainActivity.java
Created June 8, 2017 00:29
Change height animation on CardView
public class MainActivity extends AppCompatActivity {
private CardView cardView;
private Boolean isCollapsed = true;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
@beraldofilippo
beraldofilippo / ItemClickSupport.java
Last active March 7, 2021 16:41
RecyclerView single and double click listener on items of a RecyclerView.
/**
* Created by Hugo Visser.
* Please see http://www.littlerobots.nl/blog/Handle-Android-RecyclerView-Clicks/
*
* Modified by Filippo Beraldo:
* - Added OnDoubleClickListener in place of the standard OnClickListener.
*/
public class ItemClickSupport {
private final RecyclerView mRecyclerView;
@alphamu
alphamu / AA Transition App theme between light and dark themes
Last active September 4, 2024 02:07
Example of how to change themes at runtime with a smooth animation. In this example, we just switch between a light and a dark theme. The activity animation is defined in the theme and as such will be default on all activities with the set theme. [Demo Video here](http://youtu.be/Ps0phswbHls).
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
public class TransitionThemeActivity extends AppCompatActivity implements View.OnClickListener {
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active April 19, 2025 04:37
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S