When I put grid layouts in my xml file, it doesn't do anything but just shows a gray box. Plus, it doesn't have attributes like columnCount or weight. If I drag several view items and put them under the grid layout, I can't see anything.. What should I do here?
Asked
Active
Viewed 1,447 times
2
-
Can you post your `build.gradle`? – prashant17 Jan 31 '19 at 06:44
-
1@Rhee are you visit this [answer](https://stackoverflow.com/questions/49534777/android-studio-3-1-xml-preview-not-showing-for-some-xml-layouts) before or not? – Tanveer Munir Jan 31 '19 at 07:29
-
post your xml code from `content_main.xml` and did you try what @TanveerMunir has suggested? – Sanjeev Jan 31 '19 at 09:03
3 Answers
2
Implement
below gradle in your build.gradle
for GridLayout
.
implementation 'com.android.support:gridlayout-v7:28.0.0-rc02'
after Implement just clean and rebuild your project.

Mehul Kabaria
- 6,404
- 4
- 25
- 50
0
For me just going into rebuild project under build option at the top worked perfectly