将支持库版本升级到27.1.1后我同步项目我遇到以下错误:
Failed to resolve: support-core-utils
Run Code Online (Sandbox Code Playgroud)
任何的想法?
这是我的项目级构建文件:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
Run Code Online (Sandbox Code Playgroud)
和应用程序级别构建文件:
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
Run Code Online (Sandbox Code Playgroud) 如何在片段中设置页边距?
我在片段底部有一个线性布局,现在我想从该线性布局的顶部展开底部片材
android:layout_marginBottom="36dp" 不起作用,底页覆盖线性布局.
这是我的代码:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="36dp"
android:background="@drawable/shadow"
android:layout_gravity="bottom">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_add_white_24dp" />
</LinearLayout>
<LinearLayout
android:id="@+id/bottom_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ff0000"
app:behavior_hideable="true"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
android:layout_marginBottom="36dp">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Test" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud) 有没有办法强制 ViewPager2 RTL 方向?我已设置android:layoutDirection="rtl"为 viewpager2 但由于android:supportsRtl="false"清单中它仍然是 LTR。我该如何解决这个问题?