-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8747c61
commit 674fd92
Showing
7 changed files
with
207 additions
and
32 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
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,59 @@ | ||
package india.coronavirus.fight; | ||
|
||
import android.content.Intent; | ||
import android.net.Uri; | ||
import android.os.Bundle; | ||
import android.text.Html; | ||
import android.view.View; | ||
|
||
import androidx.annotation.Nullable; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import com.google.android.material.textview.MaterialTextView; | ||
import com.google.firebase.firestore.CollectionReference; | ||
import com.google.firebase.firestore.DocumentChange; | ||
import com.google.firebase.firestore.FirebaseFirestore; | ||
|
||
public class About extends AppCompatActivity { | ||
private boolean update; | ||
|
||
@Override | ||
public void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.about); | ||
MaterialTextView check = findViewById(R.id.update_available); | ||
MaterialTextView pawan = findViewById(R.id.pawan); | ||
MaterialTextView sppedx = findViewById(R.id.speedx); | ||
CollectionReference apiCollection = FirebaseFirestore.getInstance().collection("update"); | ||
apiCollection.addSnapshotListener((queryDocumentSnapshots, e) -> { | ||
if (queryDocumentSnapshots != null) { | ||
for (DocumentChange documentChange : queryDocumentSnapshots.getDocumentChanges()) { | ||
update = documentChange.getDocument().getBoolean("available"); | ||
if (update) { | ||
check.setVisibility(View.VISIBLE); | ||
check.setText(Html.fromHtml("<u>Update Available : </u>")); | ||
} | ||
|
||
} | ||
} | ||
}); | ||
pawan.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View view) { | ||
Uri uri = Uri.parse("https://pawan0411.github.io/"); | ||
Intent intent = new Intent(Intent.ACTION_VIEW, uri); | ||
startActivity(intent); | ||
} | ||
}); | ||
|
||
sppedx.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View view) { | ||
Uri uri = Uri.parse("https://github.com/TheSpeedX"); | ||
Intent intent = new Intent(Intent.ACTION_VIEW, uri); | ||
startActivity(intent); | ||
} | ||
}); | ||
|
||
} | ||
} |
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,8 @@ | ||
<!-- drawable/information.xml --> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:height="24dp" | ||
android:width="24dp" | ||
android:viewportWidth="24" | ||
android:viewportHeight="24"> | ||
<path android:fillColor="#000" android:pathData="M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" /> | ||
</vector> |
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,70 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/materialTextView" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_margin="10dp" | ||
android:text="@string/this_app_is_about_updates_related_to_coronavirus_in_india" | ||
android:textAlignment="center" | ||
android:textColor="@android:color/black" | ||
android:textSize="20sp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/update_available" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="10dp" | ||
android:text="@string/update" | ||
android:textColor="@android:color/black" | ||
android:textSize="15sp" | ||
android:visibility="gone" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/materialTextView" /> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/materialTextView2" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="10dp" | ||
android:text="Developed and Maintained By : " | ||
android:textColor="@android:color/black" | ||
android:textSize="15sp" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/update_available" /> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/pawan" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="99dp" | ||
android:layout_marginTop="15dp" | ||
android:text="@string/pawan0411" | ||
android:textColor="@android:color/black" | ||
android:textSize="15sp" | ||
android:textStyle="bold" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/materialTextView2" /> | ||
|
||
<com.google.android.material.textview.MaterialTextView | ||
android:id="@+id/speedx" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="15dp" | ||
android:text="@string/speedx" | ||
android:textColor="@android:color/black" | ||
android:textStyle="bold" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toEndOf="@+id/pawan" | ||
app:layout_constraintTop_toBottomOf="@+id/materialTextView2" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |
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,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item | ||
android:id="@+id/about_app" | ||
android:icon="@drawable/information" | ||
android:title="@string/about" /> | ||
</menu> |
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 |
---|---|---|
@@ -1,10 +1,15 @@ | ||
<resources> | ||
<string name="app_name">covid19 India</string> | ||
<string name="title_home">Home</string> | ||
<string name="title_dashboard">News</string> | ||
<string name="title_notifications">Helpline</string> | ||
<string name="title_guides">Guides</string> | ||
<string name="title_statewise">State Stats</string> | ||
<string name="prediction"><u>Predicted infection rate</u></string> | ||
<string name="the_helpline_number_for_corona_virus_91_11_23978046_toll_free_no_1075">The Helpline Number for corona–virus : +91–11–23978046 Toll Free No: 1075</string> | ||
<string name="app_name">COVID19 India</string> | ||
<string name="title_home">Home</string> | ||
<string name="title_dashboard">News</string> | ||
<string name="title_notifications">Helpline</string> | ||
<string name="title_guides">Guides</string> | ||
<string name="title_statewise">State Stats</string> | ||
<string name="prediction"><u>Predicted infection rate</u></string> | ||
<string name="the_helpline_number_for_corona_virus_91_11_23978046_toll_free_no_1075">The Helpline Number for corona–virus : +91–11–23978046 Toll Free No: 1075</string> | ||
<string name="about">About</string> | ||
<string name="pawan0411"><u>Pawan0411</u></string> | ||
<string name="speedx"><u>SpeedX</u></string> | ||
<string name="update"><u>Update Available : </u></string> | ||
<string name="this_app_is_about_updates_related_to_coronavirus_in_india">This app is about updates related to coronavirus in India.</string> | ||
</resources> |