当父级由列表组成时,Google的"材料设计"指南规定了"父级到子级"转换的以下转换.(材料设计指南)
我如何提供这样的过渡?我不知道为实现这一目标而提供的任何内置过渡.
我正在学习如何使用隐式意图和意图过滤器,并且到目前为止还无法获得正确的活动.用于触发intent的代码是:
intent = new Intent();
intent.setAction("com.appsculture.intent.action.PLUGIN_RECEIVER");
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)
并且所需活动的Intent过滤器是:
<activity android:name="PluginReceiver">
<intent-filter>
<action android:name="com.appsculture.intent.action.PLUGIN_RECEIVER"></action>
</intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud)
我得到的错误是标准的ActivityNotFound
09-04 17:15:27.827: ERROR/AndroidRuntime(2552): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.appsculture.intent.action.PLUGIN_RECEIVER }
Run Code Online (Sandbox Code Playgroud)
解决方案:只需将android.intent.category.DEFAULT类别添加到intent过滤器即可
之后就像魅力一样
我最近开始帮助一个年轻的团队改进他们的开发实践,并希望他们在每次提交之前运行 checkstyle。不幸的是,他们的代码充满了错误,实现它的唯一可扩展方法是每次在一小部分文件上运行 checkstyle。
从策略上讲,我只想对那些在 VCS 中修改过的文件运行 checkstyle。我写了一个 Gradle 脚本来实现这一点,但它似乎不起作用。有谁有关于如何实现这一点的提示吗?
apply plugin: 'checkstyle'
def getChangedFiles = { ->
try {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'diff', '--name-only'
standardOutput = stdout
}
return stdout.toString().trim().split("\n")
}
catch (ignored) {
return null;
}
}
task checkstyle(type: Checkstyle) {
configFile file("${project.rootDir}/quality/checkstyle/uncommon-checkstyle.xml")
configProperties = [
'checkstyle.cache.file': rootProject.file('build/checkstyle.cache'),
'checkstyleSuppressionsPath': file("${project.rootDir}/quality/checkstyle/suppressions.xml").absolutePath
]
source 'src'
String[] split = getChangedFiles()
for (int i=0; i<split.length; i++){
include split[i]
println split[i]
}
exclude '**/build/**' // Exclude everything inside …Run Code Online (Sandbox Code Playgroud)