From 72ab6f6cd16c4a834a2de6af46306930954b27c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavol=20Hejn=C3=BD?= Date: Mon, 22 Feb 2021 23:24:40 +0100 Subject: [PATCH 1/3] Fix minor typos in README I have fixed small grammar issues in the README file --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 98319bb5..918fed9c 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,11 @@ Not to be taken seriously. * Login * Registration *should* work, but I suggest that you better use an iOS device to register * Seeing the list of rooms however the server recommends them -* Joining rooms from said list and by direct links +* Joining rooms from the said list and by direct links * Listening and speaking * Raising hand (asking to speak) * Accepting when a moderator allows you to speak -* Real-time updates in to the participant list +* Real-time updates into the participant list * Profiles * Following and unfollowing people * Followers/following lists @@ -21,13 +21,13 @@ Not to be taken seriously. * Uploading a profile picture * Changing your name (but the official app says you can only do this once — not sure if there's a limitation on the server side) -The rest isn't implemented. In particular, there are no notifications, and you can't create and moderate rooms. There's probably a hundred bugs in the existing functionality too. +The rest isn't implemented. In particular, there are no notifications, and you can't create and moderate rooms. There are probably a hundred bugs in the existing functionality too. ### Java? In %year%?! Why not Kotlin? Why are there no jetpack libraries? System fragments?!?! Are you out of your mind? -Maybe I am. I use tools I'm most familiar with, not ones that are trendy at the particular day I'm starting the project. +Maybe I am. I use tools I'm most familiar with, not ones that are trendy on a particular day I'm starting the project. ### The design... -...sucks. Yes it does. See, this isn't meant to be a real product. I hastily put this together in 1.5 days. Alsmost like on a hackathon. This is more of a proof of concept, a stopgap measure before Clubhouse releases their official Android app that I'm sure they're making right now. It doesn't make sense to spend all this effort on something that's going to be obsolete in less than a year. +...sucks. Yes, it does. See, this isn't meant to be a real product. I hastily put this together in 1.5 days. Almost like on a hackathon. This is more of a proof of concept, a stopgap measure before Clubhouse releases their official Android app that I'm sure they're making right now. It doesn't make sense to spend all this effort on something that's going to be obsolete in less than a year. If you want to see a project where I do take UI/UX seriously and am obsessed over every little detail, go check out [Smithereen](https://github.com/grishka/Smithereen), the decentralized social media server. @@ -35,7 +35,7 @@ If you want to see a project where I do take UI/UX seriously and am obsessed ove The probability of that happening is not zero. ### Why did you make this? -I saw that project with the Clubhouse API reverse engineersed and thought to myself *why not*. The only thing I had to reverse engineer myself was the PubNub part, but a pirated copy of Charles made a quick job of that. +I saw that project with the Clubhouse API reverse engineered and thought to myself *why not*. The only thing I had to reverse engineer myself was the PubNub part, but a pirated copy of Charles made a quick job of that. ### How do I build this? Import into Android Studio and click "run". Or, there's an apk you can install in the releases section. From 0f8e56a1c46267053cb1beb6417738725c28448f Mon Sep 17 00:00:00 2001 From: alevlage Date: Tue, 23 Feb 2021 14:58:00 +0200 Subject: [PATCH 2/3] Add ability to enlarge profile photos by clicking on it --- .../houseclub/fragments/ProfileFragment.java | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Houseclub/src/main/java/me/grishka/houseclub/fragments/ProfileFragment.java b/Houseclub/src/main/java/me/grishka/houseclub/fragments/ProfileFragment.java index 0e9a6ab4..d2154186 100644 --- a/Houseclub/src/main/java/me/grishka/houseclub/fragments/ProfileFragment.java +++ b/Houseclub/src/main/java/me/grishka/houseclub/fragments/ProfileFragment.java @@ -21,6 +21,7 @@ import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.TextView; import java.text.DateFormat; @@ -39,8 +40,8 @@ import me.grishka.houseclub.api.methods.GetProfile; import me.grishka.houseclub.api.methods.Unfollow; import me.grishka.houseclub.api.methods.UpdateBio; -import me.grishka.houseclub.api.methods.UpdatePhoto; import me.grishka.houseclub.api.methods.UpdateName; +import me.grishka.houseclub.api.methods.UpdatePhoto; import me.grishka.houseclub.api.model.FullUser; public class ProfileFragment extends LoaderFragment{ @@ -53,13 +54,14 @@ public class ProfileFragment extends LoaderFragment{ private ImageView photo, inviterPhoto; private Button followBtn; private View socialButtons; - private boolean self; + private boolean self, isImageFitToScreen; @Override public void onAttach(Activity activity){ super.onAttach(activity); loadData(); self=getArguments().getInt("id")==Integer.parseInt(ClubhouseSession.userID); + isImageFitToScreen=true; if(self) setHasOptionsMenu(true); } @@ -93,6 +95,9 @@ public View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bu photo.setOnClickListener(this::onPhotoClick); name.setOnClickListener(this::onNameClick); } + else { + photo.setOnClickListener(this::onForeignPhotoClick); + } return v; } @@ -365,4 +370,15 @@ private void onPhotoClick(View v){ intent.setType("image/*"); startActivityForResult(intent, PICK_PHOTO_RESULT); } + private void onForeignPhotoClick(View view) { + if(isImageFitToScreen) { + isImageFitToScreen=false; + photo.setLayoutParams(new LinearLayout.LayoutParams((int) (272 * (getResources().getDisplayMetrics().density)), (int) (272 * (getResources().getDisplayMetrics().density)))); + photo.setAdjustViewBounds(true); + }else{ + isImageFitToScreen=true; + photo.setLayoutParams(new LinearLayout.LayoutParams((int) (72 * (getResources().getDisplayMetrics().density)), (int) (72 * (getResources().getDisplayMetrics().density)))); + photo.setScaleType(ImageView.ScaleType.FIT_XY); + } + } } From a6944ab6cff99cc166c59dd67a8cbfa471496ebc Mon Sep 17 00:00:00 2001 From: Milad Nouri Date: Thu, 4 Mar 2021 19:30:26 +0330 Subject: [PATCH 3/3] add photo edit icon to self profile. --- .../houseclub/fragments/ProfileFragment.java | 4 +- .../src/main/res/drawable/ic_photo_camera.xml | 13 + Houseclub/src/main/res/layout/profile.xml | 395 +++++++++--------- 3 files changed, 222 insertions(+), 190 deletions(-) create mode 100644 Houseclub/src/main/res/drawable/ic_photo_camera.xml diff --git a/Houseclub/src/main/java/me/grishka/houseclub/fragments/ProfileFragment.java b/Houseclub/src/main/java/me/grishka/houseclub/fragments/ProfileFragment.java index e0ee265a..b15eec07 100644 --- a/Houseclub/src/main/java/me/grishka/houseclub/fragments/ProfileFragment.java +++ b/Houseclub/src/main/java/me/grishka/houseclub/fragments/ProfileFragment.java @@ -54,7 +54,7 @@ public class ProfileFragment extends LoaderFragment{ private TextView name, username, followers, following, followsYou, bio, inviteInfo, twitter, instagram, invites; - private ImageView photo, inviterPhoto; + private ImageView photo, photo_edit_icon,inviterPhoto; private Button followBtn, inviteButton; private EditText invitePhoneNum; private View socialButtons, inviteLayout; @@ -98,6 +98,8 @@ public View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bu following.setOnClickListener(this::onFollowingClick); v.findViewById(R.id.inviter_btn).setOnClickListener(this::onInviterClick); if(self){ + photo_edit_icon=v.findViewById(R.id.photo_edit_icon); + photo_edit_icon.setVisibility(View.VISIBLE); bio.setOnClickListener(this::onBioClick); photo.setOnClickListener(this::onPhotoClick); name.setOnClickListener(this::onNameClick); diff --git a/Houseclub/src/main/res/drawable/ic_photo_camera.xml b/Houseclub/src/main/res/drawable/ic_photo_camera.xml new file mode 100644 index 00000000..ed408f86 --- /dev/null +++ b/Houseclub/src/main/res/drawable/ic_photo_camera.xml @@ -0,0 +1,13 @@ + + + + diff --git a/Houseclub/src/main/res/layout/profile.xml b/Houseclub/src/main/res/layout/profile.xml index ed9ae7a8..6e7b5af6 100644 --- a/Houseclub/src/main/res/layout/profile.xml +++ b/Houseclub/src/main/res/layout/profile.xml @@ -1,193 +1,210 @@ - - - - - - - - - -