Skip to content

Instantly share code, notes, and snippets.

@shrikant0013
shrikant0013 / GestureMediaPlayerActivity.java
Created November 4, 2016 04:55
Android example for code that needs to change settings (Manifest.permission.WRITE_SETTINGS), targetSdkVersion >= 23
/**
* Created by spandhare on 11/3/16.
*/
import com.malmstein.fenster.controller.FensterPlayerControllerVisibilityListener;
import com.malmstein.fenster.play.FensterVideoFragment;
import android.Manifest;
import android.content.Intent;
import android.net.Uri;
@ZkHaider
ZkHaider / expand-collapse.java
Last active January 30, 2022 02:31
Simple Expand / Collapse RecyclerView Item
public static class ExampleViewHolder extends RecyclerView.ViewHolder
implements View.OnClickListener {
private int originalHeight = 0;
private boolean isViewExpanded = false;
private YourCustomView yourCustomView
public ExampleViewHolder(View v) {
super(v);
v.setOnClickListener(this);
@gnuanu
gnuanu / 01.step1.md
Last active January 24, 2024 08:20
Creating a simple Hello World application Using Android NDK with C++

Prerequisites

  1. I am using GNU/Linux
  2. My IDE is IntelliJ IDEA
  3. The project is Ant based.
  4. My working directory is $JNI
  5. My C++ IDE is QtCreator (I'll mention the build steps inline).
  6. NDK should be installed and ndk-build should be available in $PATH
  7. javah should be available in $PATH

Step 1 - Create The Android Project

@staltz
staltz / introrx.md
Last active June 9, 2025 13:06
The introduction to Reactive Programming you've been missing
@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active September 4, 2024 05:58
FloatLabelLayout
/*
* Copyright 2014 Chris Banes
*
* 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