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 java.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
public class Solution { | |
public static void main(String[] args) { | |
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ |
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
private Activity getActivity() { | |
Context context = getContext(); | |
while (context instanceof ContextWrapper) { | |
if (context instanceof Activity) { | |
return (Activity)context; | |
} | |
context = ((ContextWrapper)context).getBaseContext(); | |
} | |
return null; | |
} |
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
project.configure(project) { | |
if (it.hasProperty("android")) { | |
tasks.whenTaskAdded { task -> | |
project.("android").applicationVariants.all { variant -> | |
println "${variant.name.capitalize()}" | |
println "${variant.buildType.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
# Local configuration file (sdk path, keystore pass, etc) | |
local.properties | |
keystore.properties | |
# Gradle | |
.gradle | |
build/ | |
# Android Studio Project files | |
*.iml |
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
#pragma version(1) | |
#pragma rs java_package_name(com.uievolution.vehicleinfo.android.util) | |
#pragma rs_fp_relaxed | |
rs_allocation pixels; | |
int dotSize; | |
void init() { | |
} |
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
//HACK: Get the button view and place it on the bottom right (as Google Maps app) | |
View locationButton = ((View) mMapFragment.getView().findViewById(1).getParent()).findViewById(2); | |
RelativeLayout.LayoutParams rlp = (RelativeLayout.LayoutParams) locationButton.getLayoutParams(); | |
rlp.addRule(RelativeLayout.ALIGN_PARENT_TOP, 0); | |
rlp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE); | |
rlp.setMargins(0, 0, 30, 30); |