search/tweets では一週間以上前のツイートは検索できないので注意
search/universal は公式のConsumerKey/ConsumerSecretでないと使用できない
当方では一切の責任を負いません
| <?xml version="1.0" encoding="utf-8"?><!-- | |
| ~ Copyright (C) 2015 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 |
| import android.support.v7.widget.LinearLayoutManager; | |
| import android.support.v7.widget.RecyclerView; | |
| public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
| public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName(); | |
| private int previousTotal = 0; // The total number of items in the dataset after the last load | |
| private boolean loading = true; // True if we are still waiting for the last set of data to load. | |
| private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more. | |
| int firstVisibleItem, visibleItemCount, totalItemCount; |
| public class ScrollViewWithMaxHeight extends ScrollView { | |
| public static int WITHOUT_MAX_HEIGHT_VALUE = -1; | |
| private int maxHeight = WITHOUT_MAX_HEIGHT_VALUE; | |
| public ScrollViewWithMaxHeight(Context context) { | |
| super(context); | |
| } |
| import android.support.v7.widget.RecyclerView; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.Button; | |
| import android.widget.TextView; | |
| /** | |
| * Created by khaled bakhtiari on 10/26/2014. | |
| * <a href="http://about.me/kh.bakhtiari"> | |
| */ |
| import android.content.Context; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapShader; | |
| import android.graphics.Canvas; | |
| import android.graphics.ColorFilter; | |
| import android.graphics.Paint; | |
| import android.graphics.PixelFormat; | |
| import android.graphics.Rect; | |
| import android.graphics.Shader; | |
| import android.graphics.drawable.Drawable; |
以下Android公式ドキュメント Migrating to WebView in Android 4.4 の翻訳です。 間違いなどあればぜひご指摘ください。拙いですが誰かの役に立てば幸いです。
Android 4.4(API レベル 19)では、Chrominium ベースの新しい WebView が紹介されました。この変更で、WebView のパフォーマンス向上し、最新の Web ブラウザに追いつくために、HTML5、CSS3やJavaScript を標準サポートします。WebView を使っているアプリは、Android 4.4 以上からはこれらのアップデートの恩恵を受けることになります。
本ドキュメントは WebVeiew の変更点について説明します。なお、その変更は Android 4.4 以上、つまり targetSdkVersion を "19" 以上にした場合です。
Note: targetSdkVersion を "18" 以下にした場合、WebView は以下で述べるような挙動をすることを避けるために、"quirks モード" になります。これは、パフォーマンス向上と Web 標準に対応するためです。
| import android.graphics.Bitmap; | |
| import android.graphics.Bitmap.Config; | |
| import android.graphics.BitmapShader; | |
| import android.graphics.Canvas; | |
| import android.graphics.Paint; | |
| import android.graphics.RectF; | |
| import android.graphics.Shader; | |
| // enables hardware accelerated rounded corners | |
| // original idea here : http://www.curious-creature.org/2012/12/11/android-recipe-1-image-with-rounded-corners/ |
| public class SampleFragment extends Fragment implements LoaderCallbacks<String> { | |
| private static final int LOADER_ID = 0; | |
| @Override | |
| public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
| return inflater.inflate(R.layout.fragment_main, container, false); | |
| } | |
| @Override |
| import android.content.Context; | |
| import android.graphics.Paint; | |
| import android.util.AttributeSet; | |
| import android.util.TypedValue; | |
| import android.widget.TextView; | |
| /** | |
| * サイズ自動調整TextView | |
| * | |
| */ |