For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
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 2017 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 |
Original solution sacrifices new api lint check.
Here my solution:
int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
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
//call if(BuildConfig.DEBUG) registerActivityLifecycleCallbacks(new ActivityLifecycleLogger()) in your own Application class. | |
public class ActivityLifecycleLogger implements Application.ActivityLifecycleCallbacks { | |
private static final String TAG = "LifeCycleLogger"; | |
private static final Class[] LOG_CYCLE_ACTIVITIES = new Class[] { | |
//add activities you want to log here | |
MainActivity.class | |
}; |
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
//wearversion | |
//wearlog | |
//wearvoiceinputenable | |
//wearvoiceinputdisable | |
//weargoogleapi | |
//assert | |
//pushassert | |
//uplog | |
//upcrash | |
//switchnotificationstatus |
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
此处主要参考 http://harryhsu.logdown.com/posts/198416-build-ffmpeg-on-mac-os-109 | |
根据我的编译过程做了适当修改 | |
1. Download NDK | |
https://developer.android.com/tools/sdk/ndk/index.html | |
我下载的版本是android-ndk-r10,不同的版本在下面的build脚中本需要修改的地方大致相同. | |
2. Download ffmpeg source code | |
下载 ffmpeg(http://www.ffmpeg.org/download.html) | |
推荐 git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg |
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 com.gitonway.footertab; | |
import android.app.Activity; | |
import android.graphics.Point; | |
import android.os.Bundle; | |
import android.view.Display; | |
import android.widget.RadioGroup; | |
import android.widget.RadioGroup.OnCheckedChangeListener; | |
import android.widget.TextView; |
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
// | |
// _oo0oo_ | |
// o8888888o | |
// 88" . "88 | |
// (| -_- |) | |
// 0\ = /0 | |
// ___/`---'\___ | |
// .' \\| |// '. | |
// / \\||| : |||// \ | |
// / _||||| -:- |||||- \ |