This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package niko.twodimensionalscroll; | |
| import android.content.Context; | |
| import android.view.Gravity; | |
| import android.view.View; | |
| import android.widget.LinearLayout; | |
| import android.widget.TextView; | |
| import android.widget.Toast; | |
| public class ChildDay extends LinearLayout { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) 2017 Emil Davtyan | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining | |
| * a copy of this software and associated documentation files (the | |
| * "Software"), to deal in the Software without restriction, including | |
| * without limitation the rights to use, copy, modify, merge, publish, | |
| * distribute, sublicense, and/or sell copies of the Software, and to | |
| * permit persons to whom the Software is furnished to do so, subject to | |
| * the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Connect to your API with your http lib, i use http-request: https://github.com/kevinsawicki/http-request | |
| // Then get the reader. The 'request' variable below is just a HttpRequest object | |
| // as shown here: http://kevinsawicki.github.io/http-request/ | |
| final Reader reader = request.reader(); | |
| final ObjectMapper mapper = new ObjectMapper(); | |
| final JsonFactory factory = mapper.getFactory(); | |
| // Create a new streaming parser with the reader | |
| JsonParser jp = factory.createParser(reader); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Apache 2.0 licensed. | |
| import android.content.Context; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.BaseAdapter; | |
| /** An implementation of {@link BaseAdapter} which uses the new/bind pattern for its views. */ | |
| public abstract class BindableAdapter<T> extends BaseAdapter { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.manuelpeinado; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.BaseAdapter; | |
| /** | |
| * A variation on Jake Wharton's BindingAdapter (https://gist.github.com/JakeWharton/5423616) which is slightly more convenient | |
| * for adapters that only have one view type | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.google.gson.Gson; | |
| import com.google.gson.JsonSyntaxException; | |
| import com.android.volley.AuthFailureError; | |
| import com.android.volley.NetworkResponse; | |
| import com.android.volley.ParseError; | |
| import com.android.volley.Request; | |
| import com.android.volley.Response; | |
| import com.android.volley.Response.ErrorListener; | |
| import com.android.volley.Response.Listener; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class FacebookLoginActivity extends Activity { | |
| private Button mLoginButton; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_facebook_login); | |
| mLoginButton = findViewById(R.id.login_button); | |
| mLoginButton.setOnClickListener(new View.OnClickListener() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.Random; | |
| import android.app.ListActivity; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import android.widget.ArrayAdapter; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| brew install snappy | |
| CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ant compile-native | |
| chmod 644 build/native/Mac_OS_X-x86_64-64/lib/* | |
| ls -l /usr/local/lib/libsnappy.dylib | |
| ls -l build/native/Mac_OS_X-x86_64-64/lib/libhadoop.dylib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.android.volley.toolbox.HurlStack; | |
| import com.squareup.okhttp.OkHttpClient; | |
| import java.io.IOException; | |
| import java.net.HttpURLConnection; | |
| import java.net.URL; | |
| /** | |
| * An {@link com.android.volley.toolbox.HttpStack HttpStack} implementation which | |
| * uses OkHttp as its transport. | |
| */ |