Skip to content

Instantly share code, notes, and snippets.

View EJunWhite's full-sized avatar
😄
I may be slow to respond.

EJun EJunWhite

😄
I may be slow to respond.
  • Seoul
View GitHub Profile
Snackbar snackbar;
mBinding.searchEdit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
hideSnackBar();
}
});
mBinding.searchEdit.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@EJunWhite
EJunWhite / Build.gradle
Last active January 24, 2019 01:15
Check os
def getOsName(project) {
final String osName = System.getProperty("os.name").toLowerCase();
if (osName.contains("linux")) {
return ("linux");
} else if (osName.contains("mac os x") || osName.contains("darwin") || osName.contains("osx")) {
return ("macos");
} else if (osName.contains("windows")) {
return ("windows");
} else if (osName.contains("sunos") || osName.contains("solaris")) {
let CFBundleShortVersionString = Bundle.main.infoDictionary!["CFBundleShortVersionString"] as? String
let CFBundleVersion = Bundle.main.infoDictionary!["CFBundleVersion"] as? String
let CFBundleName = Bundle.main.infoDictionary!["CFBundleName"] as? String
print("Application Version Number: \(CFBundleShortVersionString)")
print("Application Build Number : \(CFBundleVersion)")
print("Application Name : \(CFBundleName)")