与大多数人一样,我们都使用/看过Google Plus应用程序.
我感兴趣的是他们开发的ColumnGridView,它不仅可变宽度,而且可变高度,似乎基于内容将愉快地显示CardView的最佳空间.
很少有可能的解决方案来复制这个,但只是真正寻找最好的解决方案当然是google实现.
所以有人遇到过这个吗?
任何教程,示例,我可以使用的源码开始为我节省一些头脑?
甚至可能是谷歌人在计算尺寸方面的某些方向?

升级到Android构建工具2.2.0-alpha1之后.我无法配置应用程序或构建.
我从gradle获得以下堆栈跟踪:
e: java.lang.IllegalStateException: Built-in library initialization failed. Please ensure you have kotlin-runtime.jar in the classpath: java.lang.NoSuchMethodError: com.google.protobuf.GeneratedMessageLite.newSingularGeneratedExtension(Lcom/google/protobuf/MessageLite;Ljava/lang/Object;Lcom/google/protobuf/MessageLite;Lcom/google/protobuf/Internal$EnumLiteMap;ILcom/google/protobuf/WireFormat$FieldType;)Lcom/google/protobuf/GeneratedMessageLite$GeneratedExtension;
at org.jetbrains.kotlin.builtins.BuiltInsInitializer.initialize(BuiltInsInitializer.kt:45)
at org.jetbrains.kotlin.builtins.BuiltInsInitializer.get(BuiltInsInitializer.kt:62)
at org.jetbrains.kotlin.platform.JvmBuiltIns$Companion.getInstance(JvmBuiltIns.kt:32)
at org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform.getBuiltIns(JvmPlatform.kt:41)
at org.jetbrains.kotlin.resolve.TargetPlatformKt.createModule(TargetPlatform.kt:112)
at org.jetbrains.kotlin.resolve.TargetPlatformKt.createModule$default(TargetPlatform.kt:111)
at org.jetbrains.kotlin.context.ContextKt.ContextForNewModule(context.kt:124)
at org.jetbrains.kotlin.resolve.jvm.TopDownAnalyzerFacadeForJVM.createContextWithSealedModule(TopDownAnalyzerFacadeForJVM.java:163)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.analyze(KotlinToJVMBytecodeCompiler.kt:322)
at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:129)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:318)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.kt:124)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:173)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:49)
at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.java:220)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.compileNotIncremental(Tasks.kt:497)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler(Tasks.kt:370)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler(Tasks.kt:149)
at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.execute(Tasks.kt:110)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
at …Run Code Online (Sandbox Code Playgroud) 所以我正在进行maven-ing facebook-android-sdk以包含在我们的CI流程中.
Facebook的/ pom.xml中:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.facebook.android</groupId>
<artifactId>facebook-android-sdk</artifactId>
<version>3.0.0-SNAPSHOT</version>
<name>facebook-android-sdk</name>
<packaging>apklib</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
<version>r7</version>
<type>jar</type>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.4.1</version>
<configuration>
<androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
<assetsDirectory>ignored</assetsDirectory>
<resourceDirectory>${project.basedir}/res</resourceDirectory>
<nativeLibrariesDirectory>ignored</nativeLibrariesDirectory>
<sdk>
<platform>16</platform>
</sdk>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<ignoreMissingFile>false</ignoreMissingFile>
<file>target/generated-sources/r/com/facebook/android/R.java</file>
<outputFile>target/generated-sources/r/com/facebook/android/R.java</outputFile>
<regex>false</regex>
<token>static …Run Code Online (Sandbox Code Playgroud) android pom.xml maven facebook-android-sdk android-maven-plugin
我想为应用中的联系人加载联系人照片,我知道如何做到这一点,因为有很多教程要做.但这些方法(股票机器人)似乎无法撤回第三方同步的照片我想知道是否有一个坚实可靠的方式来本地做这个.
这已被问过很多次了,我可以把答案放在左边和右边.唯一的问题是它们实际上并没有解决问题.只创造解决方案.
经过一番广泛的搜索,我发现了这个:
android中有一个错误,阻止我们检索联系人照片(几乎所有丢失的联系人照片都是facebook个人资料照片).要解决此问题,我们必须通过共享证书对APK进行签名,并强制应用在shared-uid中运行.
我在https://sites.google.com/site/t2k269group/development-diary/load-contact-photo上发现了这个问题,任何人都可以详细说明如何使用共享密钥进行签名,如果这样可行的话?
如果其他任何人真的有一个可靠的解决方案加载联系人照片,无论他们同步什么.
问题:是否有可靠的方法来加载包含同步照片的联系人照片,而不仅仅是手机上设置的照片?
提前致谢.干杯,克里斯
我在android view-pager(ACL的r4)中发现了一个有趣的bug.
当在较旧或较慢的设备上滚动手指过快/离开屏幕边缘时,速度跟踪器将以错误的方式推动视图寻呼机.
我可以在原版Galaxy Tab,HTC Desire,Nexus One,旧金山,HTC Hero上重现.
打开谷歌+,市场或具有相当变化的视图寻呼机实现的东西.
如果你转到最左边的页面,然后轻轻地将手指拉过屏幕的右边缘,你就可以让取景器跳到右边(与拖动方向相反的方向).
我需要进行更多调查,但这看起来速度跟踪器无法跟上速度较慢的设备.当然,当从左向右快速滚动时,这可以使视图寻呼机跳转.尝试新市场(3.3+)从一边走到另一边,看到令人讨厌的结果!
通过扩展类来修复任何想法.我认为屏幕可能会提供奇怪的结果,当很多正在进行并可能缺少一些MotionEvent,因为我发现它几乎不可能在较新的设备上复制.(Nexus S,三星GSII,Sensation).
编辑:此问题已从ACL v6解决
谢谢,克里斯
自Hangouts 2.0起,Google已经破坏(或未记录)如何通过Intent从第三方应用发送短信正文.
这样就可以通过4.4上的应用程序发送短信完全破坏.
以下Intent不起作用:
Intent smsIntent = new Intent(Intent.ACTION_SENDTO);
smsIntent.setType("vnd.android-dir/mms-sms");
smsIntent.putExtra("address", "12125551212");
smsIntent.putExtra("sms_body","Body of Message");\
Run Code Online (Sandbox Code Playgroud)
和
Intent sendIntent = new Intent(Intent.ACTION_SENDTO);
sendIntent.setData(Uri.parse("sms:"));
sendIntent.putExtra("sms_body", x);
Run Code Online (Sandbox Code Playgroud)
环聊完全忽略了 setType("vnd.android-dir/mms-sms")
回退到该Uri.parse方法是唯一的选择,但应用程序仍然忽略sms_body键.
在这个时间点,它没有记录,所以玩了几个变化%body%无法实现.
值得注意的是,我们尝试了http://www.ietf.org/rfc/rfc5724.txt根据规范创建URI.
sms:12345666777?body=Text here但没有帮助.
*注意:我使用的是ACTION_VIEW,更改为ACTION_SENDTO,仍然无济于事*
在我的应用程序中有十个活动.
当我按下后退按钮时,10个屏幕保存了历史记录.但是当我点击下一个按钮时,新屏幕没有任何历史数据.
单击下一步按钮时如何保留历史记录?我的意图代码是
Bundle bundle = getIntent().getExtras();
String Group = bundle.getString("GroupApVehicle");
Intent log = new Intent(EngineCompartment.this, FrontAxle.class);
Bundle bun = new Bundle();
bun.putString("Group", Group);
bun.putString("ECSCORE", _StrpretriScoreCount);
System.out.println("Enginegroup" + Group);
bun.putString("TestIDFA", strtestid);
log.putExtras(bun);
startActivityForResult(log,IPC_ID);
Run Code Online (Sandbox Code Playgroud) android ×6
android-view ×1
facebook ×1
google-plus ×1
kotlin ×1
maven ×1
pom.xml ×1
twitter ×1