The problem here is that the preview tool from android studio won't load my view, the other views i have it's fine.
activity_maps_view.xml
<RelativeLayout 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:id="@+id/relativeTop"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".View.MapsView">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageView4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:contentDescription="@string/signin_logoBackground"
android:cropToPadding="true"
android:scaleType="centerInside"
app:srcCompat="@drawable/login_logo_3x" />
</LinearLayout>
<android.support.design.widget.BottomNavigationView
android:id="@+id/top_navigation_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:itemBackground="@android:color/white"
app:itemIconTint="@drawable/nav_selector"
app:itemTextColor="@drawable/nav_selector"
app:menu="@menu/top_menu">
</android.support.design.widget.BottomNavigationView>
</LinearLayout>
</ScrollView>
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/activity_maps_view" />
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
app:itemBackground="@android:color/white"
app:itemIconTint="@drawable/nav_selector"
app:itemTextColor="@drawable/nav_selector"
app:menu="@menu/bottom_menu">
</android.support.design.widget.BottomNavigationView>
</RelativeLayout>
build.grade
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 27
defaultConfig {
applicationId "de.bho_dive.app.android"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
}
As you can see, the preview tool won't show anything, i already tried to change the theme, change the android version, restart android studio, import again the project, and nothing seems to work. Any ideas?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.