Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

How to fix the postition of a LinearLayout kotlin

 
Ranch Hand
Posts: 179
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to make the linear layout "linearLayoutProductDetailQuantitiesChoose" in one position and never change even if the height of the othe component above change
 
Rancher
Posts: 491
7
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
post your dimens.xml
 
Maha Sakka
Ranch Hand
Posts: 179
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Randy Tong
Rancher
Posts: 491
7
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Inside CardView, you need to have a LinearLayout with orientation vertical. You also need two more LinearLayout, one is to wrap all the item until the productQuantitiesTextView, and another used to wrap the item below productQuantitiesTextView.

Next, assign layout_weight to both of the LinearLayout.

 
Maha Sakka
Ranch Hand
Posts: 179
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the result after changing my code with yours
Screenshot_2019-07-29-09-07-56.png
[Thumbnail for Screenshot_2019-07-29-09-07-56.png]
 
Randy Tong
Rancher
Posts: 491
7
Android Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the image before you replace to mine.
 
Maha Sakka
Ranch Hand
Posts: 179
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following image is mine before change
Screenshot_2019-07-29-10-01-39.png
[Thumbnail for Screenshot_2019-07-29-10-01-39.png]
 
Randy Tong
Rancher
Posts: 491
7
Android Tomcat Server Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try adjust the value for both layout_weight.
 
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic