Skip to content

Instantly share code, notes, and snippets.

View CheckableLinearLayout
package com.example.checkableviews;
/*******************************************************************************
* Copyright 2013 Chris Banes.
*
* 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
View gist:d17a229bdfc803036c4c
import android.content.Context;
import android.content.res.Resources;
import android.util.TypedValue;
public class UiUtils {
private UiUtils() {
}
public static int getStatusBarHeight(Context context) {
@hl5pma
hl5pma / build.gradle
Last active Dec 29, 2015
ViewPagerIndicator Maven 중앙 저장소에 등록하는 빌드 스크립트
View build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
}
apply plugin: 'android-library'
apply plugin: 'maven'
View gist:6518622
try {
// force to use overflow menu
ViewConfiguration config = ViewConfiguration.get(this);
Field menuKeyField = ViewConfiguration.class
.getDeclaredField("sHasPermanentMenuKey");
if (menuKeyField != null) {
menuKeyField.setAccessible(true);
menuKeyField.setBoolean(config, false);
}
} catch (Exception ex) {
You can’t perform that action at this time.