-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from minhquan1313/branchOfBinh
Branch of binh
- Loading branch information
Showing
15 changed files
with
277 additions
and
9 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
app/src/main/java/com/mtb/foodorderreview/HomeFoodType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.mtb.foodorderreview; | ||
|
||
public class HomeFoodType { | ||
private String name; | ||
|
||
private int img; | ||
|
||
public HomeFoodType(String name, int img) { | ||
this.img = img; | ||
this.name = name; | ||
} | ||
|
||
public int getImg() { | ||
return img; | ||
} | ||
|
||
public void setImg(int img) { | ||
this.img = img; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
app/src/main/java/com/mtb/foodorderreview/HomeFoodTypeGridAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.mtb.foodorderreview; | ||
|
||
import android.content.Context; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
import android.widget.BaseAdapter; | ||
import android.widget.ImageView; | ||
import android.widget.TextView; | ||
|
||
import java.util.List; | ||
|
||
public class HomeFoodTypeGridAdapter extends BaseAdapter { | ||
private Context context; | ||
|
||
private final List<HomeFoodType> list; | ||
private final LayoutInflater inflater; | ||
|
||
public HomeFoodTypeGridAdapter(Context context, List<HomeFoodType> list) { | ||
this.list = list; | ||
this.context = context; | ||
inflater = LayoutInflater.from(context); | ||
} | ||
|
||
@Override | ||
public int getCount() { | ||
return list.size(); | ||
} | ||
|
||
@Override | ||
public Object getItem(int position) { | ||
return list.get(position); | ||
} | ||
|
||
@Override | ||
public long getItemId(int position) { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public View getView(int position, View convertView, ViewGroup parent) { | ||
convertView = inflater.inflate(R.layout.home_food_type_grid_layout, null); | ||
|
||
TextView text = convertView.findViewById(R.id.home_food_type_grid_layout_text_1); | ||
text.setText(list.get(position).getName()); | ||
|
||
ImageView img = convertView.findViewById(R.id.home_food_type_grid_layout_img_1); | ||
img.setImageResource(list.get(position).getImg()); | ||
|
||
return convertView; | ||
} | ||
} |
36 changes: 35 additions & 1 deletion
36
app/src/main/java/com/mtb/foodorderreview/MainActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,48 @@ | ||
package com.mtb.foodorderreview; | ||
|
||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.AdapterView; | ||
import android.widget.GridView; | ||
import android.widget.Toast; | ||
|
||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import android.os.Bundle; | ||
import java.util.Arrays; | ||
|
||
public class MainActivity extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_main); | ||
|
||
HomeFoodTypeUI(); | ||
} | ||
|
||
private void HomeFoodTypeUI() { | ||
HomeFoodType rice = new HomeFoodType("Rice", R.drawable.icon_food_type_rice); | ||
HomeFoodType rice2 = new HomeFoodType("Rice2", R.drawable.icon_food_type_rice); | ||
HomeFoodType rice3 = new HomeFoodType("Rice3", R.drawable.icon_food_type_rice); | ||
HomeFoodType rice4 = new HomeFoodType("Rice4", R.drawable.icon_food_type_rice); | ||
HomeFoodType rice5 = new HomeFoodType("Rice5", R.drawable.icon_food_type_rice); | ||
|
||
HomeFoodType[] l = {rice, rice2, rice3, rice4, rice5}; | ||
|
||
HomeFoodTypeGridAdapter adapter = new HomeFoodTypeGridAdapter(this, Arrays.asList(l)); | ||
|
||
GridView gridView = findViewById(R.id.home_food_type_grid_1); | ||
gridView.setAdapter(adapter); | ||
|
||
Toast.makeText(this, "Hihi", Toast.LENGTH_SHORT).show(); | ||
|
||
gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() { | ||
@Override | ||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) { | ||
Object o = gridView.getItemAtPosition(position); | ||
HomeFoodType foodType = (HomeFoodType) o; | ||
Toast.makeText(MainActivity.this, "Selected :" + " " + foodType.getName(), Toast.LENGTH_LONG).show(); | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="24dp" android:tint="#000000" | ||
android:viewportHeight="24" android:viewportWidth="24" | ||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FF000000" android:pathData="M17.6,11.48 L19.44,8.3a0.63,0.63 0,0 0,-1.09 -0.63l-1.88,3.24a11.43,11.43 0,0 0,-8.94 0L5.65,7.67a0.63,0.63 0,0 0,-1.09 0.63L6.4,11.48A10.81,10.81 0,0 0,1 20L23,20A10.81,10.81 0,0 0,17.6 11.48ZM7,17.25A1.25,1.25 0,1 1,8.25 16,1.25 1.25,0 0,1 7,17.25ZM17,17.25A1.25,1.25 0,1 1,18.25 16,1.25 1.25,0 0,1 17,17.25Z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt" | ||
android:viewportWidth="512.001" | ||
android:viewportHeight="512.001" | ||
android:width="512.001dp" | ||
android:height="512.001dp"> | ||
<path | ||
android:pathData="M42.999 207.682c-0.412 -9.846 -1.653 -19.882 1.863 -28.362c5.372 -12.954 20.759 -20.565 28.468 -32.078c7.767 -11.602 8.955 -28.715 18.792 -38.551s26.95 -11.025 38.551 -18.792c11.514 -7.708 19.125 -23.096 32.078 -28.468c12.732 -5.279 28.972 0.165 42.809 -2.572c13.429 -2.656 26.343 -13.954 40.551 -13.954s27.123 11.298 40.551 13.954c13.838 2.737 30.079 -2.707 42.809 2.572c12.954 5.372 20.565 20.759 32.079 28.468c11.602 7.767 28.715 8.955 38.551 18.792s11.025 26.95 18.792 38.551c7.708 11.514 23.096 19.125 28.468 32.078c3.515 8.478 2.276 18.512 1.863 28.356L42.999 207.682z" | ||
android:fillColor="#FFFFFF" /> | ||
<path | ||
android:pathData="M97.202 179.32c5.372 -12.954 20.76 -20.565 28.468 -32.078c7.767 -11.602 8.955 -28.715 18.792 -38.551s26.95 -11.025 38.551 -18.792c11.514 -7.708 19.125 -23.096 32.078 -28.468c12.732 -5.279 28.972 0.165 42.809 -2.572c4.833 -0.956 9.598 -3.032 14.382 -5.297c-8.509 -4.029 -17.074 -8.657 -26.17 -8.657c-14.209 0 -27.122 11.298 -40.551 13.954c-13.838 2.737 -30.078 -2.708 -42.809 2.572c-12.954 5.371 -20.565 20.759 -32.079 28.468c-11.602 7.767 -28.715 8.955 -38.551 18.792s-11.025 26.95 -18.792 38.551c-7.708 11.514 -23.096 19.125 -28.468 32.078c-3.516 8.48 -2.275 18.516 -1.863 28.362l52.339 -0.001C94.926 197.836 93.685 187.799 97.202 179.32z" | ||
android:fillColor="#E0E0E2" /> | ||
<path | ||
android:pathData="M489.413 32.381l-5.125 -2.522c-4.667 -2.296 -10.309 -0.318 -12.521 4.389l-53 112.785c0.045 0.068 0.083 0.141 0.129 0.208c3.69 5.512 9.14 10.13 14.409 14.868l60.272 -117.13C495.956 40.355 494.08 34.678 489.413 32.381z" | ||
android:fillColor="#C3FB3A" /> | ||
<path | ||
android:pathData="M400.103 108.691c1.372 1.372 2.563 2.897 3.64 4.518l42.298 -90.115c2.21 -4.708 0.129 -10.313 -4.618 -12.438l-5.213 -2.334c-4.747 -2.125 -10.314 0.057 -12.354 4.841l-37.213 87.308C391.703 102.53 396.415 105.002 400.103 108.691z" | ||
android:fillColor="#C3FB3A" /> | ||
<path | ||
android:pathData="M399.976 100.47l37.213 -87.308c0.563 -1.321 1.402 -2.435 2.411 -3.323l-3.391 -1.518c-4.747 -2.125 -10.314 0.057 -12.354 4.841l-37.213 87.308c5.06 2.059 9.772 4.532 13.46 8.22c1.372 1.372 2.563 2.897 3.64 4.518l4.142 -8.824C405.426 102.869 402.758 101.602 399.976 100.47z" | ||
android:fillColor="#65C27C" /> | ||
<path | ||
android:pathData="M432.229 147.242c-0.045 -0.067 -0.084 -0.14 -0.129 -0.208l53 -112.785c0.538 -1.145 1.282 -2.125 2.163 -2.925l-2.975 -1.464c-4.667 -2.296 -10.309 -0.318 -12.521 4.389l-53 112.785c0.045 0.068 0.083 0.141 0.129 0.208c3.69 5.512 9.14 10.13 14.409 14.868l4.314 -8.384C435.612 151.669 433.763 149.535 432.229 147.242z" | ||
android:fillColor="#65C27C" /> | ||
<path | ||
android:pathData="M17.385 207.682v73.603c0 86.049 57.84 155.824 136.762 178.097V504.5h183.93v-45.118c78.922 -22.274 136.762 -92.049 136.762 -178.097v-73.603H17.385z" | ||
android:fillColor="#FF5023" /> | ||
<path | ||
android:pathData="M60.051 281.284v-73.603H17.385v73.603c0 86.049 57.84 155.824 136.762 178.097V504.5h42.666v-45.118C117.891 437.108 60.051 367.333 60.051 281.284z" | ||
android:fillColor="#D80029" /> | ||
<group | ||
android:rotation="45" | ||
android:scaleX="-0.9999904" | ||
android:scaleY="-0.9999904" | ||
android:translateX="190.252" | ||
android:translateY="728.9937"> | ||
<path | ||
android:pathData="M197.247 276.236H294.965V373.954H197.247V276.236Z" | ||
android:fillColor="#FEDA44" /> | ||
</group> | ||
<path | ||
android:pathData="M215.439 325.105L265.326 275.217 246.111 256.004 177.012 325.105 246.111 394.206 265.326 374.991Z" | ||
android:fillColor="#FF9911" /> | ||
<path | ||
android:pathData="M441.863 231.826H456.863V254.531H441.863V231.826Z" | ||
android:fillColor="#FFFFFF" /> | ||
<path | ||
android:pathData="M352.104 419.217l6.336 13.597c60.711 -28.291 98.425 -87.004 98.425 -153.228v-11.249h-15v11.249C441.865 339.913 407.471 393.417 352.104 419.217z" | ||
android:fillColor="#FFFFFF" /> | ||
<path | ||
android:pathData="M294.436 474.452H316.757V489.452H294.436V474.452Z" | ||
android:fillColor="#FFFFFF" /> | ||
<path | ||
android:pathData="M175.468 474.452H284.536V489.452H175.468V474.452Z" | ||
android:fillColor="#FFFFFF" /> | ||
<path | ||
android:pathData="M377.868 163.585l12.465 -8.345c-2.152 -3.214 -3.649 -7.463 -5.234 -11.962c-2.36 -6.698 -5.034 -14.289 -10.703 -19.957l-10.606 10.606c3.259 3.259 5.155 8.639 7.162 14.335C372.776 153.441 374.663 158.797 377.868 163.585z" | ||
android:fillColor="#000000" /> | ||
<path | ||
android:pathData="M293.963 96.706c5.998 -0.327 11.663 -0.633 15.851 1.104c4.321 1.792 8.143 6.068 12.189 10.595c3.634 4.067 7.393 8.272 12.131 11.444c4.788 3.205 10.143 5.092 15.321 6.917c1.083 0.381 2.165 0.763 3.237 1.156l5.162 -14.084c-1.131 -0.415 -2.272 -0.817 -3.414 -1.219c-4.499 -1.585 -8.748 -3.082 -11.961 -5.234c-3.163 -2.117 -6.14 -5.448 -9.291 -8.975c-4.757 -5.322 -10.147 -11.354 -17.628 -14.456c-7.338 -3.043 -15.001 -2.628 -22.409 -2.225c-4.8 0.26 -9.333 0.506 -13.198 -0.258l-2.911 14.715C282.753 97.314 288.451 97.005 293.963 96.706z" | ||
android:fillColor="#000000" /> | ||
<path | ||
android:pathData="M501.257 35.455c-1.426 -4.315 -4.457 -7.796 -8.534 -9.803l-5.125 -2.522c-4.078 -2.006 -8.685 -2.283 -12.973 -0.78s-7.714 4.596 -9.647 8.708l-46.094 98.089c-0.174 -0.492 -0.349 -0.984 -0.524 -1.481c-1.77 -5.023 -3.581 -10.143 -6.131 -14.89l40.6 -86.497c1.931 -4.114 2.123 -8.726 0.541 -12.985c-1.582 -4.26 -4.737 -7.628 -8.884 -9.485l-5.213 -2.334c-4.148 -1.857 -8.762 -1.966 -12.993 -0.308c-4.231 1.658 -7.542 4.873 -9.325 9.054l-34.402 80.714c-0.477 -0.169 -0.953 -0.337 -1.429 -0.504c-5.749 -2.025 -11.179 -3.938 -15.402 -6.766c-4.158 -2.784 -7.963 -7.042 -11.991 -11.549c-6.105 -6.832 -12.419 -13.896 -21.388 -17.615c-8.792 -3.645 -18.166 -3.136 -27.232 -2.645c-6.131 0.333 -11.922 0.648 -16.996 -0.356c-4.802 -0.95 -9.889 -3.395 -15.275 -5.983c-8.3 -3.989 -16.884 -8.114 -26.731 -8.114c-9.848 0 -18.432 4.125 -26.732 8.114c-5.386 2.588 -10.473 5.033 -15.275 5.983c-5.072 1.003 -10.864 0.688 -16.995 0.356c-9.065 -0.492 -18.44 -1.001 -27.232 2.645c-8.968 3.719 -15.281 10.782 -21.386 17.614c-4.028 4.507 -7.833 8.765 -11.992 11.549c-4.223 2.828 -9.653 4.741 -15.403 6.767c-8.597 3.029 -17.486 6.161 -24.28 12.955c-6.794 6.793 -9.926 15.683 -12.955 24.28c-2.026 5.75 -3.939 11.18 -6.767 15.403c-2.784 4.159 -7.042 7.963 -11.549 11.992c-6.832 6.105 -13.896 12.418 -17.614 21.387c-3.179 7.666 -3.199 15.774 -2.826 23.735H9.885v81.103c0 84.963 54.716 158.091 136.762 183.692v47.023h198.93v-47.023c82.046 -25.603 136.762 -98.729 136.762 -183.692v-81.103h-25.223c0.373 -7.961 0.353 -16.069 -2.826 -23.735c-2.642 -6.372 -6.976 -11.401 -11.712 -15.971l57.666 -112.066C502.323 44.371 502.683 39.77 501.257 35.455zM396.378 96.758l34.377 -80.655c0.245 -0.574 0.678 -0.844 0.999 -0.97c0.321 -0.126 0.822 -0.222 1.391 0.033l5.213 2.334c0.569 0.255 0.832 0.693 0.951 1.016c0.12 0.323 0.207 0.826 -0.058 1.391l-37.641 80.192c-0.059 -0.044 -0.122 -0.087 -0.181 -0.131c-0.081 -0.06 -0.163 -0.117 -0.244 -0.176c-0.347 -0.253 -0.699 -0.503 -1.061 -0.75c-0.175 -0.119 -0.351 -0.234 -0.527 -0.35c-0.252 -0.166 -0.507 -0.331 -0.767 -0.494c-0.264 -0.166 -0.53 -0.329 -0.797 -0.489c-0.159 -0.095 -0.319 -0.19 -0.481 -0.284c-0.361 -0.211 -0.725 -0.418 -1.091 -0.619C396.433 96.79 396.406 96.774 396.378 96.758zM51.79 182.193c2.409 -5.809 7.919 -10.734 13.754 -15.948c5.004 -4.473 10.179 -9.097 14.018 -14.832c3.881 -5.797 6.203 -12.388 8.449 -18.763c2.586 -7.34 5.029 -14.273 9.414 -18.658c4.385 -4.385 11.318 -6.828 18.658 -9.414c6.375 -2.246 12.966 -4.568 18.763 -8.449c5.734 -3.839 10.359 -9.014 14.832 -14.018c5.214 -5.834 10.139 -11.345 15.947 -13.753c3.47 -1.439 7.568 -1.843 12.009 -1.843c2.778 0 5.69 0.158 8.666 0.32c6.785 0.368 13.801 0.749 20.719 -0.62c6.671 -1.32 12.868 -4.298 18.861 -7.178c7.099 -3.412 13.804 -6.634 20.235 -6.634s13.136 3.222 20.234 6.634c5.994 2.88 12.191 5.858 18.862 7.178c6.917 1.368 13.933 0.987 20.719 0.62c7.731 -0.419 15.033 -0.816 20.674 1.523c5.809 2.409 10.734 7.919 15.949 13.754c4.472 5.004 9.097 10.179 14.831 14.018c5.797 3.88 12.388 6.203 18.762 8.449c2.672 0.941 5.287 1.865 7.748 2.869c0.591 0.241 1.158 0.481 1.704 0.722c0.067 0.03 0.134 0.06 0.201 0.09c0.483 0.215 0.947 0.43 1.396 0.645c0.088 0.042 0.177 0.084 0.264 0.127c0.98 0.478 1.878 0.959 2.707 1.45c0.159 0.094 0.314 0.192 0.47 0.288c0.234 0.145 0.464 0.29 0.687 0.436c0.181 0.119 0.36 0.239 0.536 0.361c0.191 0.132 0.375 0.266 0.557 0.4c0.172 0.126 0.345 0.252 0.512 0.382c0.196 0.153 0.383 0.309 0.569 0.464c0.135 0.112 0.273 0.222 0.404 0.337c0.314 0.276 0.617 0.557 0.905 0.844c0.243 0.243 0.478 0.497 0.71 0.755c0.67 0.755 1.326 1.616 1.987 2.61l0.45 0.677c2.556 4.096 4.375 9.245 6.267 14.615c1.746 4.955 3.548 10.035 6.081 14.777l-0.098 0.208l2.231 3.408c0.072 0.118 0.143 0.23 0.212 0.333c0.008 0.012 0.015 0.025 0.023 0.037c0.536 0.8 1.102 1.574 1.686 2.333c3.601 4.687 8.031 8.655 12.34 12.506l2.51 2.255c4.854 4.404 9.178 8.723 11.236 13.685c2.065 4.981 1.998 11.259 1.665 17.983l-351.062 0.006c-0.188 -4.644 -0.109 -8.935 1.277 -12.277c1.792 -4.322 6.068 -8.144 10.596 -12.19c4.066 -3.634 8.271 -7.392 11.444 -12.13l-12.465 -8.345c-2.117 3.162 -5.448 6.139 -8.975 9.291c-5.322 4.756 -11.354 10.147 -14.457 17.629c-2.446 5.899 -2.656 12.006 -2.436 18.023H50.124C49.792 193.455 49.723 187.176 51.79 182.193zM467.339 281.284c0 80.044 -52.765 148.715 -131.299 170.879l-5.463 1.542V497h-168.93v-30.119h128.097v-15H155.222c-47.482 -13.668 -85.456 -44.37 -107.899 -84.291h57.908v-15h-65.41c-9.67 -21.899 -14.936 -46.035 -14.936 -71.308v-34.594h48.186v-15H24.885V215.18h350.871v33.822h15V215.18h76.583L467.339 281.284L467.339 281.284zM486.907 41.548l-55.785 108.409c-0.095 -0.092 -0.19 -0.184 -0.284 -0.276c-0.428 -0.419 -0.845 -0.839 -1.254 -1.26c-0.168 -0.173 -0.338 -0.345 -0.503 -0.519c-0.556 -0.586 -1.096 -1.175 -1.605 -1.769l51.079 -108.696c0.265 -0.564 0.708 -0.819 1.033 -0.933c0.326 -0.114 0.831 -0.192 1.389 0.083l5.125 2.522c0.56 0.275 0.806 0.723 0.914 1.05C487.124 40.488 487.192 40.993 486.907 41.548z" | ||
android:fillColor="#000000" /> | ||
<path | ||
android:pathData="M166.406 325.105l79.707 79.707l79.707 -79.707l-79.707 -79.707L166.406 325.105zM246.112 383.599l-58.495 -58.494l58.494 -58.494l58.494 58.494L246.112 383.599z" | ||
android:fillColor="#000000" /> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<solid android:color="@color/white" /> | ||
<corners android:radius="12sp" /> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout 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:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
tools:context=".MainActivity"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Hello World!" /> | ||
|
||
|
||
<GridView | ||
android:id="@+id/home_food_type_grid_1" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:numColumns="4" | ||
android:paddingHorizontal="20sp" | ||
android:verticalSpacing="20sp" | ||
android:horizontalSpacing="20sp" /> | ||
|
||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:id="@+id/home_food_type_grid_layout_1" | ||
|
||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
|
||
android:background="@drawable/shape_food_type_box" | ||
android:padding="8sp" | ||
android:orientation="vertical"> | ||
|
||
<androidx.constraintlayout.widget.ConstraintLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<ImageView | ||
android:id="@+id/home_food_type_grid_layout_img_1" | ||
|
||
android:layout_width="match_parent" | ||
android:layout_height="0dp" | ||
|
||
app:layout_constraintDimensionRatio="3:2" | ||
|
||
android:importantForAccessibility="no" | ||
android:src="@drawable/icon_food_type_rice" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> | ||
|
||
|
||
<TextView | ||
android:id="@+id/home_food_type_grid_layout_text_1" | ||
|
||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:ellipsize="end" | ||
android:gravity="center" | ||
android:maxLines="1" | ||
android:text="TextView TextView" | ||
android:layout_marginTop="8dp" | ||
android:textSize="12sp" /> | ||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<color name="black">#FF000000</color> | ||
<color name="white">#FFFFFFFF</color> | ||
|
||
<color name="primary">#98EECC</color> | ||
<color name="primaryDarker">#57A183</color> | ||
<color name="black">#2f3542</color> | ||
<color name="white">#f1f2f6</color> | ||
|
||
<color name="grey_1">#dfe4ea</color> | ||
<color name="grey_2">#ced6e0</color> | ||
<color name="grey_3">#a4b0be</color> | ||
<color name="grey_4">#747d8c</color> | ||
|
||
<color name="primary">#2ed573</color> | ||
<color name="primaryDarker">#24A359</color> | ||
<color name="primarySofter">#73DD9F</color> | ||
</resources> |
Oops, something went wrong.