我是android编程的新手。因此,任何帮助将不胜感激:所以我正在开发一个新项目,其中我使用 Retrofit 2.0 beta 2(Rest Client)。所发生的情况是,我用于 Web 服务的网站未经验证,并且没有 SSL 证书。谁能帮我绕过 SSL 证书检查。
我刚刚更新了我android studio
的2.2 Preview 3
尝试新的constraint layout
我把一个edittext
放入布局并在我的手机上运行应用程序但这就是我得到的
然后我尝试将constraint layout
代码转换回代码之前constraint layout
,结果是一样的.
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.ellohinc.constrainttest.MainActivity">
<android.support.design.widget.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_main"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:src="@android:drawable/ic_dialog_email" />
Run Code Online (Sandbox Code Playgroud)
content_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/content_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:showIn="@layout/activity_main"
tools:context="com.ellohinc.constrainttest.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="@+id/content_main"
app:layout_constraintLeft_toLeftOf="@+id/content_main"
app:layout_constraintRight_toRightOf="@+id/content_main"
app:layout_constraintTop_toTopOf="@+id/content_main" />
</android.support.constraint.ConstraintLayout>
Run Code Online (Sandbox Code Playgroud)
请任何帮助将不胜感激.
java android android-layout android-studio android-studio-2.2
我在stackoverflow帖子中读到(链接在这里)
通过为文档使用可预测的(例如顺序的)ID,您可以增加到达后端基础设施热点的机会。这降低了写操作的可扩展性。
我想如果有人能更好地解释使用顺序或用户提供的 ID 时可能发生的限制。
如何获取与协议缓冲区字段相关的选项?
假设我有一个带有自定义选项的字段,例如:
syntax = "proto3";
package main;
import "google/protobuf/descriptor.proto";
extend google.protobuf.FieldOptions {
bool required = 7000;
}
message Person {
string name = 1 [(required) = true];
}
Run Code Online (Sandbox Code Playgroud)
生成了 js 文件protoc
syntax = "proto3";
package main;
import "google/protobuf/descriptor.proto";
extend google.protobuf.FieldOptions {
bool required = 7000;
}
message Person {
string name = 1 [(required) = true];
}
Run Code Online (Sandbox Code Playgroud)
我已经阅读了如何从此处检索其他语言的选项,但似乎可以在 Javascript 中进行任何操作。
任何帮助将不胜感激!