forked from signalapp/Signal-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display user profile information in settings activity
Allow for editing // FREEBIE
- Loading branch information
Showing
15 changed files
with
222 additions
and
25 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:orientation="horizontal" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical"> | ||
|
||
<ImageView android:id="@+id/avatar" | ||
android:layout_width="64dp" | ||
android:layout_height="64dp" | ||
android:layout_margin="16dp" | ||
android:transitionName="avatar"/> | ||
|
||
<LinearLayout android:orientation="vertical" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginLeft="10dp" | ||
android:layout_marginStart="10dp"> | ||
|
||
<TextView android:id="@+id/profile_name" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="5dp" | ||
android:textSize="20sp" | ||
tools:text="Voltarine DeClyre"/> | ||
|
||
<TextView android:id="@+id/number" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
tools:text="+14151231234"/> | ||
|
||
</LinearLayout> | ||
|
||
</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
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
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
26 changes: 26 additions & 0 deletions
26
src/org/thoughtcrime/securesms/ClearProfileAvatarActivity.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,26 @@ | ||
package org.thoughtcrime.securesms; | ||
|
||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.support.v7.app.AlertDialog; | ||
|
||
public class ClearProfileAvatarActivity extends Activity { | ||
|
||
@Override | ||
public void onResume() { | ||
super.onResume(); | ||
|
||
new AlertDialog.Builder(this) | ||
.setTitle(R.string.ClearProfileActivity_remove_profile_photo) | ||
.setNegativeButton(android.R.string.cancel, (dialog, which) -> finish()) | ||
.setPositiveButton(R.string.ClearProfileActivity_remove, (dialog, which) -> { | ||
Intent result = new Intent(); | ||
result.putExtra("delete", true); | ||
setResult(Activity.RESULT_OK, result); | ||
finish(); | ||
}) | ||
.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
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
Oops, something went wrong.