Responsiveness - Android studio

Asked

Viewed 66 times

2

I’m having a layout incompatibility with other versions of android.

on my android 8.0.0 the layout is like this

On another mobile with android 4.4.2

I’m using recyclerview,grid,cardview

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    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.support:cardview-v7:27.1.1'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    //Glide
    implementation 'com.github.bumptech.glide:glide:4.7.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
    //searchView
    implementation 'com.miguelcatalan:materialsearchview:1.4.0'
    //firebase
    implementation 'com.google.firebase:firebase-core:12.0.1'
    implementation 'com.google.firebase:firebase-messaging:12.0.1'
}
apply plugin: 'com.google.gms.google-services'

Didn’t fit the xml here, follows xml link: https://pastebin.com/ZsLUJ9Ky

What can be done to solve this problem? my project is compatible with android 4.1 up.

  • is looking like a problem in photo viewing, not a question of responsiveness.

  • I tried to change the name, format of the image and nothing helps.

  • What type of image are you using? png, bitmap, Base64?

  • I am using png 40px

  • tried to put the image as an xml to see if it works?

  • am without the Androidstudio to test, try putting android:layout_gravity="center" on the line 101

  • It didn’t work Gaspar :(

  • The layout works normal from api 23

Show 3 more comments

1 answer

1


I managed to solve the problem, follow the solution.

no build Gradle add:

implementation 'com.android.support:gridlayout-v7:27+'

//(put 27+ pq my sdk is 27)

errors that generate in xml switch from android to app

and every reference you make in the activities change from Gridlayout to android.support.v7.widget.Gridlayout

Browser other questions tagged

You are not signed in. Login or sign up in order to post.