- Nでは長押しした位置にContextMenuが出るがどうやっているか
View#performLongClick(int,int)
とView#showContextMenu(int,int)
が追加されているView#performLongClickInternal
で指の位置があるかによってshowContextMenu(int,int)
とshowContextMenu()
を呼び分け- NではDarkThemeにするとPopupWindowが黒背景になるが、どうにかならんのか
- M以前はDialogだったのでテーマを書き換えられた。NはPopupかつ
com.android.internal.R.attr.contextPopupMenuStyle
を使っているのできびしそう?
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
Completable som1 = Completable.fromAction(() -> System.out.println("Hello World")).subscribeOn(Schedulers.io()); | |
Completable som2 = Completable.fromAction(() -> System.out.println("Foo bar")).subscribeOn(Schedulers.io()); | |
Completable.merge(som1, som2).await(); | |
System.out.println("await done"); |
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 React, { Component } from 'react'; | |
import { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
View, | |
ListView, | |
RefreshControl | |
} from 'react-native'; |
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 abstract class EndlessRecyclerViewScrollListener extends RecyclerView.OnScrollListener { | |
// The minimum amount of items to have below your current scroll position | |
// before loading more. | |
private int visibleThreshold = 5; | |
// The current offset index of data you have loaded | |
private int currentPage = 0; | |
// The total number of items in the dataset after the last load | |
private int previousTotalItemCount = 0; |
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 final class Either<Left, Right> { | |
private final Optional<Left> left; | |
private final Optional<Right> right; | |
private Either(Optional<Left> left, Optional<Right> right) { | |
this.left = left; | |
this.right = right; | |
} | |
public static <Left, Right> Either<Left, Right> left(@NonNull Left value) { |

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
# -*- coding: utf-8 -*- | |
import commands | |
import glob | |
import os | |
import xml.etree.ElementTree as ElementTree | |
# http://stackoverflow.com/questions/33573807/faithfully-preserve-comments-in-parsed-xml-python-2-7 | |
class CommentedTreeBuilder(ElementTree.TreeBuilder): | |
def __init__(self, *args, **kwargs): |
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
// Created by react-native-create-bridge | |
// import RCTBridgeModule | |
#if __has_include(<React/RCTBridgeModule.h>) | |
#import <React/RCTBridgeModule.h> | |
#elif __has_include(“RCTBridgeModule.h”) | |
#import “RCTBridgeModule.h” | |
#else | |
#import “React/RCTBridgeModule.h” // Required when used as a Pod in a Swift project | |
#endif |
We use git-secret to encrypt/decrypt sensitive information like production passwords.
Each developper needs to generate a pair of private/public key.
https://help.github.com/articles/generating-a-new-gpg-key/
gpg --full-generate-key