- 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 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 zundoko; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Random; | |
public class Zundoko { | |
private String z = "ズン"; | |
private String d = "ドコ"; |
This file contains 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
Show hidden characters
{ | |
"file_regex": "^(...*?):([0-9]*):?([0-9]*)", | |
"selector": ["source.kt"], | |
"shell_cmd": "gradle -Pmain=\"${file_name}\"" | |
} |
This file contains 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
extension Date { | |
struct Extension { | |
let date: Date | |
struct Dependencies { | |
let calendar: Calendar | |
let locale: Locale | |
let timeZone: TimeZone | |
} |
This file contains 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
// PathSimplifier.swift | |
import UIKit | |
private let TOLERANCE: CGFloat = 1e-6 | |
private let EPSILON: CGFloat = 1e-12 | |
extension CGPoint { | |
func add(p: CGPoint) -> CGPoint { | |
return CGPointMake(x+p.x, y+p.y) |
This file contains 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.android.gms.common.GoogleApiAvailability | |
import com.google.android.gms.tasks.Task | |
import splitties.init.appCtx | |
import kotlin.coroutines.experimental.suspendCoroutine | |
val googleApiAvailability = GoogleApiAvailability.getInstance()!! | |
inline val playServicesAvailability get() = googleApiAvailability.isGooglePlayServicesAvailable(appCtx) | |
@JvmName("awaitVoid") | |
suspend fun Task<Void>.await() = suspendCoroutine<Unit> { continuation -> |
This file contains 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
<?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 |
This file contains 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 2016 Google Inc. | |
* | |
* 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 |
OlderNewer