Skip to content

Commit

Permalink
add User guidance message
Browse files Browse the repository at this point in the history
  • Loading branch information
omocomo committed Mar 17, 2021
1 parent 7085fb5 commit 5a0ef30
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 8 deletions.
1 change: 1 addition & 0 deletions AmongEarth/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public View getView(int i, View view, ViewGroup viewGroup) {
ImageView imageView = new ImageView(context);
imageView.setLayoutParams(new GridView.LayoutParams(300, 300));
imageView.setScaleType(ImageView.ScaleType.FIT_XY);
imageView.setPadding(5,30,5,30);
imageView.setPadding(5,25,5,25);

String img_uri = arrayList.get(i).getUpload_file();
Log.d("img_uri1", img_uri+"");
Expand Down Expand Up @@ -184,10 +184,10 @@ public void onClick(View view) {
mDatabase.child("user").child(userId).child("profile").addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot snapshot) {
Object profile_num = snapshot.getValue();
Object profile_num = snapshot.getValue().toString();
Log.d("profile_num", profile_num.toString());
if (profile_num.equals(1)) userProfile.setImageResource(R.drawable.person1);
else if (profile_num.equals(2)) userProfile.setImageResource(R.drawable.person2);
if (profile_num.equals("1")) userProfile.setImageResource(R.drawable.person1);
else if (profile_num.equals("2")) userProfile.setImageResource(R.drawable.person2);
else userProfile.setImageResource(R.drawable.person3);
}

Expand Down
Binary file added AmongEarth/app/src/main/res/drawable/close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 17 additions & 1 deletion AmongEarth/app/src/main/res/layout/activity_myrecord.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,33 @@

</androidx.appcompat.widget.Toolbar>

<TextView
android:id="@+id/guide_text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Shows all waste records you've recorded."
android:layout_marginTop="15dp"
android:textSize="17sp"
android:textColor="@color/mediumGray"
app:layout_constraintTop_toBottomOf="@id/toolbar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/gridView"
/>

<GridView
android:id="@+id/gridView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:gravity="center"
android:numColumns="3"
android:verticalSpacing="1dp"
android:horizontalSpacing="1dp"
app:layout_constraintTop_toBottomOf="@id/guide_text1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.9"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">

</GridView>
Expand Down
15 changes: 13 additions & 2 deletions AmongEarth/app/src/main/res/layout/community_zerowaste_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,23 @@
android:layout_gravity="center"/>

</androidx.appcompat.widget.Toolbar>

<TextView
android:id="@+id/guide_text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Shows all records that participated in the challenge."
android:layout_marginTop="60dp"
android:textSize="17sp"
android:textColor="@color/mediumGray"
android:layout_centerHorizontal="true"/>

<ListView
android:layout_marginTop="15dp"
android:layout_marginTop="7dp"
android:id="@+id/zero_waste_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/toolbar"
android:layout_below="@id/guide_text2"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:divider="@android:color/transparent"
Expand Down
2 changes: 1 addition & 1 deletion AmongEarth/app/src/main/res/layout/dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.03"
app:srcCompat="@drawable/close_white" />
app:srcCompat="@drawable/close" />

<ImageButton
android:id="@+id/btnDelete"
Expand Down

0 comments on commit 5a0ef30

Please sign in to comment.