Skip to content

Commit 3dda5c6

Browse files
Timer Countdown fixed
1 parent d4876cc commit 3dda5c6

File tree

3 files changed

+8
-51
lines changed

3 files changed

+8
-51
lines changed

app/src/main/java/com/assistant/android/bolchal/MainActivity.java

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -252,53 +252,6 @@ public void onVerificationFailed(@NonNull FirebaseException e) {
252252
*/
253253

254254
}
255-
/*
256-
@Override
257-
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
258-
super.onActivityResult(requestCode, resultCode, data);
259-
260-
if(requestCode == RC_PHOTO_PICKER && resultCode==RESULT_OK){
261-
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm a");
262-
Date date = new Date();
263-
264-
Uri selectedImageUri = Objects.requireNonNull(data).getData();
265-
// Get a reference to store file at chat_photos/<FILENAME>
266-
StorageReference photoRef = mChatPhotosStorageReference.child(selectedImageUri.getLastPathSegment());
267-
268-
// Toast.makeText(MainActivity.this,selectedImageUri.toString(),Toast.LENGTH_SHORT).show();
269-
270-
// Upload file to Firebase Storage
271-
photoRef.putFile(selectedImageUri)
272-
.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
273-
@Override
274-
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
275-
//Get a Url to the uploaded content
276-
Task<Uri> downloadUrl = taskSnapshot.getStorage().getDownloadUrl();
277-
278-
downloadUrl.addOnSuccessListener(new OnSuccessListener<Uri>() {
279-
@Override
280-
public void onSuccess(Uri uri) {
281-
// Message message = new Message(uri.toString(),mUserName,null,dateFormat.format(date.getTime()));
282-
// mMessageDatabaseReference.push().setValue(message);
283-
284-
// Set the download URL to the message box, so that the user can send it to the database
285-
Message friendlyMessage = new Message(null, mUserName, uri.toString(),dateFormat.format(date));
286-
mMessageDatabaseReference.push().setValue(friendlyMessage);
287-
}
288-
});
289-
290-
}
291-
})
292-
.addOnFailureListener(new OnFailureListener() {
293-
@Override
294-
public void onFailure(@NonNull Exception e) {
295-
Toast.makeText(MainActivity.this,"unsucessful Upload",Toast.LENGTH_SHORT).show();
296-
}
297-
});
298-
}
299-
}
300-
301-
*/
302255

303256
/**
304257
* TODO : Edit rules of real Time Firebase

app/src/main/res/layout/layout_details.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
android:layout_width="wrap_content"
1515
android:layout_height="wrap_content"
1616
android:layout_marginBottom="16dp"
17-
android:text="Let's Update Your Profile"
17+
android:text="@string/update_your_profile"
1818
android:layout_marginTop="8dp"
1919
android:textColor="@color/white"
2020
android:textSize="18sp"
@@ -55,7 +55,7 @@
5555
android:layout_marginTop="10dp"
5656
android:layout_marginBottom="32dp"
5757
android:background="@color/purple_700"
58-
android:text="Upload your Profile Photo"
58+
android:text="@string/upload_your_profile_photo"
5959
android:textColor="@color/white"
6060
app:layout_constraintBottom_toTopOf="@+id/userName_inputArea"
6161
app:layout_constraintEnd_toEndOf="parent"
@@ -94,7 +94,7 @@
9494
android:layout_marginTop="16dp"
9595
android:layout_marginEnd="32dp"
9696
android:background="@drawable/rounded_border_rectangular_box"
97-
android:text="Next >>>"
97+
android:text="@string/next"
9898
android:textColor="@color/purple_700"
9999
android:textSize="20sp"
100100
app:layout_constraintEnd_toEndOf="parent"
@@ -105,7 +105,7 @@
105105
android:layout_width="wrap_content"
106106
android:layout_height="wrap_content"
107107
android:layout_marginBottom="24dp"
108-
android:text="This will be visible to your Bolchal Groups."
108+
android:text="@string/this_will_be_visible_to_your_bolchal_groups"
109109
android:textColor="@color/white"
110110
app:layout_constraintBottom_toBottomOf="parent"
111111
app:layout_constraintEnd_toEndOf="parent"

app/src/main/res/values/strings.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@
1111
<string name="verify">Verify</string>
1212
<string name="welcome">Welcome to BolChal</string>
1313
<string name="anonymus">Anonymus</string>
14+
<string name="update_your_profile">Let\'s Update Your Profile</string>
15+
<string name="upload_your_profile_photo">Upload your Profile Photo</string>
16+
<string name="next"><![CDATA[Next >>>]]></string>
17+
<string name="this_will_be_visible_to_your_bolchal_groups">This will be visible to your Bolchal Groups.</string>
1418
</resources>

0 commit comments

Comments
 (0)