Note: This is just a quickly hacked together task
To Use:
- Paste the task below in a gradle build file
- Call
gradle invalidate -Pdependency=group:name:version
substituting the dependency you want to invalidate.
//Override in your touch-enabled view (this can be differen than the view you use for displaying the cam preview) | |
@Override | |
public boolean onTouch(View view, MotionEvent motionEvent) { | |
final int actionMasked = motionEvent.getActionMasked(); | |
if (actionMasked != MotionEvent.ACTION_DOWN) { | |
return false; | |
} | |
if (mManualFocusEngaged) { | |
Log.d(TAG, "Manual focus already engaged"); | |
return true; |
package bapspatil.pantheon.utils; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import java.io.IOException; | |
import bapspatil.pantheon.network.RetrofitAPI; | |
import okhttp3.Cache; |
object StringUtils { | |
fun format(context: Context?, value: Float?): String? { | |
return trimZero(context?.resources?.getString(R.string.float_format, value ?: 0f)) | |
} | |
fun format(context: Context?, value: Int?): String? { | |
return trimZero(context?.resources?.getString(R.string.int_format, value ?: 0)) | |
} | |
fun trimTrailingZero(value: String?): String? { |
package com.mirrordust.gpscellinfodemo; | |
public class BaseStation { | |
private int mcc; // Mobile Country Code | |
private int mnc; // Mobile Network Code | |
private int lac; // Location Area Code or TAC(Tracking Area Code) for LTE |
/* Doubly Linked List implementation */ | |
#include<stdio.h> | |
#include<stdlib.h> | |
struct Node { | |
int data; | |
struct Node* next; | |
struct Node* prev; | |
}; |
/* | |
* 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 |
You can use this class to realize a simple sectioned grid RecyclerView.Adapter
without changing your code.
The RecyclerView
has to use a GridLayoutManager
.
This is a porting of the class SimpleSectionedListAdapter
provided by Google
If you are looking for a sectioned list RecyclerView.Adapter
you can take a look here
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$("button").click(function(){ | |
$.post("http://hdechalange-solve.appspot/challenge/003/endpoint", | |
{ | |
id: "id103019" |