Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent overlapping of Images On Home Screen #144

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/src/main/java/memphis/myapplication/SettingsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ public void changePhoto(View view) {
startActivityForResult(intent, PICK_PHOTO);
}

// register
public void register(View view) {
// open up photos directory
Intent i = new Intent(this,LoginActivity.class);
startActivity(i);
}

@Override
public void onActivityResult(int requestCode, int resultCode,
Intent resultData) {
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@
android:id="@+id/files"
android:layout_width="@dimen/margin_178dp"
android:layout_height="@dimen/margin_205dp"
android:layout_marginStart="@dimen/margin_8dp"
android:layout_marginTop="@dimen/margin_32dp"
android:layout_marginEnd="@dimen/margin_16dp"
android:contentDescription="@string/files"
android:onClick="startFiles"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/camera"
app:layout_constraintTop_toBottomOf="@+id/toolbar"
app:srcCompat="@drawable/folder" />

Expand All @@ -56,12 +58,13 @@
android:id="@+id/rcvdImages"
android:layout_width="@dimen/margin_178dp"
android:layout_height="@dimen/margin_205dp"
android:layout_marginBottom="@dimen/margin_8dp"
android:layout_marginStart="@dimen/margin_8dp"
android:layout_marginTop="@dimen/margin_32dp"
android:layout_marginEnd="@dimen/margin_16dp"
android:contentDescription="@string/received_images"
android:onClick="seeRcvdPhotos"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/friends"
app:layout_constraintTop_toBottomOf="@+id/files_label"
app:srcCompat="@drawable/images_icon" />

Expand Down
17 changes: 16 additions & 1 deletion app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,19 @@
app:layout_constraintTop_toBottomOf="@id/profilePhoto"
/>

</android.support.constraint.ConstraintLayout>
<Button
android:id="@+id/register"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/rounded_button"
android:onClick="register"
android:layout_marginTop="@dimen/margin_10dp"
android:text="@string/register"
android:padding="@dimen/margin_10dp"
android:textColor="@color/white"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/changePhotoButton"
/>

</android.support.constraint.ConstraintLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<string name="app_name">npChat</string>
<string name="scan">Scan</string>
<string name="action_settings">Settings</string>
<string name="register">Register</string>

<string name="publish">Publish</string>
<string name="advertise">Advertise</string>
<string name="cancel">Cancel</string>
Expand Down Expand Up @@ -42,6 +42,7 @@

<!--settings activity-->
<string name="change_photo">Change Photo</string>
<string name="register">Register</string>

<!--sign up activity-->
<string name="email_label">Email:</string>
Expand Down