Skip to content

Instantly share code, notes, and snippets.

daichan4649 daichan4649

Block or report user

Report or block daichan4649

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Jung0
Jung0 / .commit_template
Last active Apr 10, 2020
🤘 Emoji prefix to use at commit message
View .commit_template
# ==================== Emojis ====================
# 🎉 :tada: 初めてのコミット(Initial Commit)
# 🔖 :bookmark: バージョンタグ(Version Tag)
# ✨ :sparkles: 新機能(New Feature)
# 🐛 :bug: バグ修正(Bagfix)
# ♻️ :recycle: リファクタリング(Refactoring)
# 📚 :books: ドキュメント(Documentation)
# 🎨 :art: デザインUI/UX(Accessibility)
@yanzm
yanzm / MainActivity.java
Created Jan 26, 2017
Customize GridLayoutManager sample
View MainActivity.java
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final RecyclerView recyclerView = new RecyclerView(this);
setContentView(recyclerView);
recyclerView.setHasFixedSize(true);
@dadino
dadino / activity_main.xml
Last active Apr 29, 2019
A CoordinatorLayout layout, with a Google Map that collapse itself. A TabLayout (inside the CollapsingToolbarLayout) provides navigation for the ViewPager, that sits just below the AppBarLayout. The FloatingActionButton is used to go to the next page in the ViewPager.
View activity_main.xml
<android.support.design.widget.CoordinatorLayout
android:id="@+id/main_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
View android_material_design_colours.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
@cyrilmottier
cyrilmottier / ResourcesAdditions.java
Last active May 31, 2020
Lightweight key-value pairs resources for Android applications.
View ResourcesAdditions.java
package com.cyrilmottier.android.resourcesadditions;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.os.Bundle;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/**
* @author Cyril Mottier
@shikajiro
shikajiro / adbscreen.sh
Created Nov 19, 2013
Androidで5秒間のデモ動画を撮るときのスクリプト。撮った映像はdropboxの公開フォルダに入れてリンクをクリップボードにコピーします。
View adbscreen.sh
echo "start adb shell capture"
DATE=$(date +%Y%m%d%H%M%S)
FILENAME=${DATE}.mp4
DROPBOX_ID=462856
adb shell screenrecord --verbose --time-limit 5 --size 540x960 /sdcard/demo.mp4
adb pull /sdcard/demo.mp4 ~/Dropbox/Public/capture/${FILENAME}
adb shell rm /sdcard/temp.png
DROPBOX_URL=https://dl.dropboxusercontent.com/u/${DROPBOX_ID}/capture/${FILENAME}
@shikajiro
shikajiro / adbscreen.sh
Created Nov 15, 2013
1.Androidの画面をキャプチャする。 2.Dropboxのpublicフォルダに入れる 3.その公開URLをクリップボードにコピーする そんなスクリプト。
View adbscreen.sh
echo "start adb shell capture"
DATE=$(date +%Y%m%d%H%M%S)
FILENAME=${DATE}.png
DROPBOX_ID=462856
adb shell screencap -p /sdcard/temp.png
adb pull /sdcard/temp.png ~/Dropbox/Public/capture/${FILENAME}
adb shell rm /sdcard/temp.png
DROPBOX_URL=https://dl.dropboxusercontent.com/u/${DROPBOX_ID}/capture/${FILENAME}
View SectionsPagerAdapter.java
/**
* タブの切替毎に必要なFragmentを取得するためのAdapterクラス
*/
public static class SectionsPagerAdapter extends FragmentPagerAdapter {
private final Context mContext;
private final ViewPager mViewPager;
private final ArrayList<TabInfo> mTabs = new ArrayList<TabInfo>();
private static final class TabInfo {
private final Class<?> clazz;
@wate
wate / syntax.md
Last active May 28, 2020
Markdownで行こう!
View syntax.md

Markdownで行こう!

Markdownとは?

Markdownのルールで書かれたテキストはタグなど複雑な要素が用いられていないため
直感的に分かりやすく、HTMLに変換しないままでも配布することが可能です。
Markdownのルールは[Settext][]、[atx][]、[Textile][]、[reStructuredText][]、
[Grutatext][]、[EtTe][]といったテキスト文書をHTMLに変換するツールを参考にしています。

View 1MarkerAnimation.java
/* Copyright 2013 Google Inc.
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */
package com.example.latlnginterpolation;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.os.Build;
You can’t perform that action at this time.