mirror of
https://github.com/SoPat712/TrackCovid19.git
synced 2025-08-22 02:38:45 -04:00
Compare commits
42 Commits
Author | SHA1 | Date | |
---|---|---|---|
21f9caf4a0 | |||
7dee5e4d9d | |||
d7efe2315f | |||
29363e4669 | |||
7ae426429a | |||
a937032b52 | |||
a813eae57c | |||
b79607a31f | |||
47cc3da7dd | |||
36d94bad94 | |||
c141340b29 | |||
92f329841a | |||
9575e10f22 | |||
1e9f512afc | |||
cee2747a97 | |||
80ce3b8106 | |||
a51fe4092d | |||
4a11aeb7fe | |||
d413538daa | |||
4889a52cac | |||
6c1d03f314 | |||
ba5127ecc8 | |||
5a256d94e0 | |||
472a441dbd | |||
1338ca9965 | |||
595623b412 | |||
9e1e04333c | |||
16c3059a45 | |||
6515694dbe | |||
2782552fca | |||
244cd3a57a | |||
535f157c5b | |||
bb62488afb | |||
1e2ee57245 | |||
293e291f09 | |||
c86b5cd7e1 | |||
7eb6fac10b | |||
39f66c7142 | |||
1424bcc65c | |||
e9d3f0689a | |||
5a3cdacb1d | |||
23cd687b85 |
39
.gitignore
vendored
Normal file
39
.gitignore
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# Created by https://www.gitignore.io/api/java,gradle
|
||||
|
||||
### Java ###
|
||||
*.class
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
|
||||
### Gradle ###
|
||||
.gradle
|
||||
/build/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
||||
# Cache of project
|
||||
.gradletasknamecache
|
||||
|
||||
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
|
||||
# gradle/wrapper/gradle-wrapper.properties
|
||||
|
||||
# End of https://www.gitignore.io/api/java,gradle
|
||||
.gradle/5.6.4/executionHistory/executionHistory.lock
|
||||
.gradle/5.6.4/executionHistory/executionHistory.bin
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
1
.idea/markdown-navigator.xml
generated
1
.idea/markdown-navigator.xml
generated
@@ -30,6 +30,7 @@
|
||||
<option name="COMMONMARK_LISTS" value="true" />
|
||||
<option name="EMOJI_SHORTCUTS" value="true" />
|
||||
<option name="GFM_TABLE_RENDERING" value="true" />
|
||||
<option name="JEKYLL_FRONT_MATTER" value="true" />
|
||||
<option name="PRODUCTION_SPEC_PARSER" value="true" />
|
||||
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
|
||||
</ParserOptions>
|
||||
|
91
.idea/navEditor.xml
generated
Normal file
91
.idea/navEditor.xml
generated
Normal file
@@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="navEditor-manualLayoutAlgorithm2">
|
||||
<option name="myPositions">
|
||||
<map>
|
||||
<entry key="mobile_navigation.xml">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPositions">
|
||||
<map>
|
||||
<entry key="nav_sed">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="12" />
|
||||
<option name="y" value="12" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="nav_yourcountry">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="256" />
|
||||
<option name="y" value="12" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="nav_yourrealcountry">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="500" />
|
||||
<option name="y" value="12" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="nav_yoursettings">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="12" />
|
||||
<option name="y" value="12" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="nav_yourstate">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="12" />
|
||||
<option name="y" value="368" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="nav_yourworld">
|
||||
<value>
|
||||
<LayoutPositions>
|
||||
<option name="myPosition">
|
||||
<Point>
|
||||
<option name="x" value="12" />
|
||||
<option name="y" value="12" />
|
||||
</Point>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</LayoutPositions>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@@ -5,14 +5,14 @@ If it is needed, feel free to submit an issue on this Github page, and the issue
|
||||
|
||||
# Downloading the app onto your own (Android)phone
|
||||
|
||||
In order to download the app on your own, you will need to navigate to my release apk download page, [which I will link here](https://github.com/souravp712/TrackCovid19/releases/download/v1.1/TrackCovid19.apk), or you can wait for the approval of the app to the Google Play Store.
|
||||
In order to download the app on your own, you will need to navigate to my release apk download page, [which I will link here](https://github.com/souravp712/TrackCovid19/releases/download/v1.3/TrackCovid19.apk), or you can wait for the approval of the app to the Google Play Store.
|
||||
|
||||
You may need to accept some permissions in order for the app to be installed. Then click install, and the app will be installed onto your own Android device for your own usages.
|
||||
|
||||
# Editing the app on your own
|
||||
|
||||
Code Rating: 
|
||||
Gradle check: 
|
||||
Gradle check: 
|
||||
|
||||
In a terminal on MacOS or Linux, run ```git clone https://github.com/souravp712/TrackCovid19``` if you have git installed and then open the folder in Android Studio or another similar code editor, or [go to this link for an easier download process on any OS.](https://github.com/souravp712/TrackCovid19/archive/master.zip)
|
||||
|
||||
|
BIN
app/.DS_Store
vendored
BIN
app/.DS_Store
vendored
Binary file not shown.
@@ -30,15 +30,15 @@
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/classes" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/out" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/out" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debugAndroidTest/out" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/out" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debugAndroidTest/out" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debugAndroidTest/out" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debugUnitTest/out" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
|
||||
|
BIN
app/src/main/.DS_Store
vendored
BIN
app/src/main/.DS_Store
vendored
Binary file not shown.
30
app/src/main/java/com/josh/trackcovid19v2/LogsUtil.java
Normal file
30
app/src/main/java/com/josh/trackcovid19v2/LogsUtil.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package com.josh.trackcovid19v2;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
/**
|
||||
* This class will provide utility to read logs.
|
||||
*
|
||||
* @author Chintan Rathod (http://chintanrathod.com)
|
||||
*/
|
||||
public class LogsUtil {
|
||||
|
||||
public static StringBuilder readLogs() {
|
||||
StringBuilder logBuilder = new StringBuilder();
|
||||
try {
|
||||
Process process = Runtime.getRuntime().exec("logcat -d");
|
||||
BufferedReader bufferedReader = new BufferedReader(
|
||||
new InputStreamReader(process.getInputStream()));
|
||||
|
||||
String line;
|
||||
while ((line = bufferedReader.readLine()) != null) {
|
||||
logBuilder.append(line + "\n");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
}
|
||||
return logBuilder;
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,11 @@
|
||||
package com.josh.trackcovid19v2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
@@ -24,6 +28,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
setContentView(R.layout.activity_main);
|
||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
hideKeyboardFrom(this);
|
||||
DrawerLayout drawer = findViewById(R.id.drawer_layout);
|
||||
NavigationView navigationView = findViewById(R.id.nav_view);
|
||||
// Passing each menu ID as a set of Ids because each
|
||||
@@ -38,6 +43,16 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
Toast.makeText(getApplicationContext(), "Data Imported Successfully",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
public static void hideKeyboardFrom(Activity activity) {
|
||||
InputMethodManager imm = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
|
||||
//Find the currently focused view, so we can grab the correct window token from it.
|
||||
View view = activity.getCurrentFocus();
|
||||
//If no view currently has focus, create a new one, just so we can grab a window token from it
|
||||
if (view == null) {
|
||||
view = new View(activity);
|
||||
}
|
||||
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
|
@@ -0,0 +1,185 @@
|
||||
package com.josh.trackcovid19v2;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.InflateException;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link SendFeedbackFragment#newInstance} factory method to
|
||||
* create an instance of this fragment.
|
||||
*/
|
||||
public class SendFeedbackFragment extends Fragment {
|
||||
// TODO: Rename parameter arguments, choose names that match
|
||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||
private static final String ARG_PARAM1 = "param1";
|
||||
private static final String ARG_PARAM2 = "param2";
|
||||
|
||||
// TODO: Rename and change types of parameters
|
||||
private String mParam1;
|
||||
private String mParam2;
|
||||
|
||||
public SendFeedbackFragment() {
|
||||
// Required empty public constructor
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this factory method to create a new instance of
|
||||
* this fragment using the provided parameters.
|
||||
*
|
||||
* @param param1 Parameter 1.
|
||||
* @param param2 Parameter 2.
|
||||
* @return A new instance of fragment SendFeedbackFragment.
|
||||
*/
|
||||
// TODO: Rename and change types and number of parameters
|
||||
public static SendFeedbackFragment newInstance(String param1, String param2) {
|
||||
SendFeedbackFragment fragment = new SendFeedbackFragment();
|
||||
Bundle args = new Bundle();
|
||||
args.putString(ARG_PARAM1, param1);
|
||||
args.putString(ARG_PARAM2, param2);
|
||||
fragment.setArguments(args);
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (getArguments() != null) {
|
||||
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
// Inflate the layout for this fragment
|
||||
View view = inflater.inflate(R.layout.fragment_send_feedback, container, false);
|
||||
final TextView to = (TextView) view.findViewById(R.id.sendTo);
|
||||
final EditText message = (EditText) view.findViewById(R.id.EmailText);
|
||||
final EditText subject = (EditText) view.findViewById(R.id.subject);
|
||||
|
||||
Button sendE = (Button) view.findViewById(R.id.sendEmail);
|
||||
sendE.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(android.view.View v) {
|
||||
message.setCursorVisible(false);
|
||||
message.clearFocus();
|
||||
subject.setCursorVisible(false);
|
||||
subject.clearFocus();
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
|
||||
|
||||
builder.setTitle("Data");
|
||||
builder.setMessage("We will need to take some data from your device to fix the report. Is this okay with you?");
|
||||
|
||||
builder.setPositiveButton("YES", new DialogInterface.OnClickListener() {
|
||||
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
String system = System.getProperty("os.version");
|
||||
Integer API = Build.VERSION.SDK_INT;
|
||||
String device = Build.DEVICE;
|
||||
String model = Build.MODEL;
|
||||
String product = Build.PRODUCT;
|
||||
String display = Build.DISPLAY;
|
||||
String type = Build.TYPE;
|
||||
String user = Build.USER;
|
||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||
((Activity) getContext()).getWindowManager()
|
||||
.getDefaultDisplay()
|
||||
.getMetrics(displayMetrics);
|
||||
int height = displayMetrics.heightPixels + getNavigationBarHeight();
|
||||
int width = displayMetrics.widthPixels;
|
||||
String toS = "joshpatra12@protonmail.com";
|
||||
String subS = subject.getText().toString();
|
||||
String mesS = message.getText().toString() + "\n\n\n\n\n\n" + "\nAPI: " + API + "\nDevice: "
|
||||
+ device + "\nModel: "+ model +"\nType:" + type +"\nUser:" + user +
|
||||
"\nDisplay height: " + height + "\nDisplay width: " + width;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Intent emailIntent = new Intent(Intent.ACTION_SENDTO);
|
||||
emailIntent.putExtra(Intent.EXTRA_EMAIL, toS);
|
||||
emailIntent.putExtra(Intent.EXTRA_SUBJECT, subS);
|
||||
emailIntent.putExtra(Intent.EXTRA_TEXT, mesS + "\n\n\n\n\n\n" + "\nAPI: " + API + "\nDevice: "
|
||||
+ device + "\nModel: " + model + "\nType:" + type + "\nUser:" + user +
|
||||
"\nDisplay height: " + height + "\nDisplay width: " + width);
|
||||
startActivity(Intent.createChooser(emailIntent, "Choose an app to sdend the email with ⬇️"));
|
||||
|
||||
*/
|
||||
/*
|
||||
Intent email = new Intent(Intent.ACTION_SEND);
|
||||
|
||||
email.putExtra(Intent.EXTRA_EMAIL , new String [] {toS});
|
||||
|
||||
email.putExtra(Intent.EXTRA_SUBJECT , subS);
|
||||
email.putExtra(Intent.EXTRA_TEXT , mesS);
|
||||
email.setType("message/rfc822");
|
||||
startActivity(Intent.createChooser(email, "Choose an app to send the email with ⬇"));
|
||||
*
|
||||
|
||||
*/
|
||||
Intent intent = new Intent(Intent.ACTION_SENDTO);
|
||||
intent.setData(Uri.parse("mailto:")); // only email apps should handle this
|
||||
intent.putExtra(Intent.EXTRA_EMAIL, new String [] {toS});
|
||||
intent.putExtra(Intent.EXTRA_SUBJECT, subS);
|
||||
intent.putExtra(Intent.EXTRA_TEXT, mesS);
|
||||
startActivity(Intent.createChooser(intent, "Choose an app to send the email with ⬇"));
|
||||
dialog.dismiss();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
builder.setNegativeButton("NO", new DialogInterface.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
|
||||
Toast.makeText(getActivity(), "Canceled", Toast.LENGTH_SHORT).show();
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
});
|
||||
return view;
|
||||
}
|
||||
|
||||
private int getNavigationBarHeight() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
||||
DisplayMetrics metrics = new DisplayMetrics();
|
||||
((Activity) getContext()).getWindowManager()
|
||||
.getDefaultDisplay()
|
||||
.getMetrics(metrics);
|
||||
int usableHeight = metrics.heightPixels;
|
||||
((Activity) getContext()).getWindowManager()
|
||||
.getDefaultDisplay()
|
||||
.getRealMetrics(metrics);
|
||||
int realHeight = metrics.heightPixels;
|
||||
if (realHeight > usableHeight)
|
||||
return realHeight - usableHeight;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
@@ -1,6 +1,7 @@
|
||||
package com.josh.trackcovid19v2.ui.yourworld;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ClipDrawable;
|
||||
import android.os.Build;
|
||||
@@ -14,6 +15,7 @@ import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -42,6 +44,7 @@ public class YourworldFragment extends Fragment {
|
||||
ViewGroup container, Bundle savedInstanceState) {
|
||||
|
||||
View view = inflater.inflate(R.layout.fragment_yourworld, container, false);
|
||||
hideKeyboardFrom(getActivity());
|
||||
SwipeRefreshLayout mSwipeRefreshLayout = view.findViewById(R.id.swiperefresh);
|
||||
mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||
@Override
|
||||
@@ -153,7 +156,7 @@ public class YourworldFragment extends Fragment {
|
||||
ss.setSpan(fcsWhite, 0, 16, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
textView8.setText(ss);
|
||||
} else {
|
||||
Spanned text = Html.fromHtml("<i>Daily Increment: " + "<b>" + "-" + dailyIncWithCommas + "</i></b>");
|
||||
Spanned text = Html.fromHtml("<i>Daily Increment: " + "<b>" + "" + dailyIncWithCommas + "</i></b>");
|
||||
SpannableString ss = new SpannableString(text);
|
||||
ForegroundColorSpan fcsWhite = new ForegroundColorSpan(Color.WHITE);
|
||||
@SuppressLint("ResourceAsColor") ForegroundColorSpan fcsGreen = new ForegroundColorSpan(R.color.just_cuz);
|
||||
@@ -163,17 +166,17 @@ public class YourworldFragment extends Fragment {
|
||||
if ((ACases[0] - yACases[0]) >= 0) {
|
||||
textView9.setText(Html.fromHtml("<b><i>" + "+" + dailyActWithCommas + "</i></b>"));
|
||||
} else {
|
||||
textView9.setText(Html.fromHtml("<b><i>" + "-" + dailyActWithCommas + "</i></b>"));
|
||||
textView9.setText(Html.fromHtml("<b><i>" + "" + dailyActWithCommas + "</i></b>"));
|
||||
}
|
||||
if ((recovered[0] - yRecovered[0]) >= 0) {
|
||||
textView10.setText(Html.fromHtml("<b><i>" + "+" + dailyRecoveredWithCommas + "</i></b>"));
|
||||
} else {
|
||||
textView10.setText(Html.fromHtml("<b><i>" + "-" + dailyRecoveredWithCommas + "</i></b>"));
|
||||
textView10.setText(Html.fromHtml("<b><i>" + "" + dailyRecoveredWithCommas + "</i></b>"));
|
||||
}
|
||||
if ((Toddeaths[0] - yDeaths[0]) >= 0) {
|
||||
textView11.setText(Html.fromHtml("<b><i>" + "+" + dailyDeathWithCommas + "</i></b>"));
|
||||
} else {
|
||||
textView11.setText(Html.fromHtml("<b><i>" + "-" + dailyDeathWithCommas + "</i></b>"));
|
||||
textView11.setText(Html.fromHtml("<b><i>" + "" + dailyDeathWithCommas + "</i></b>"));
|
||||
}
|
||||
|
||||
//blahahahahahahahah
|
||||
@@ -196,8 +199,16 @@ public class YourworldFragment extends Fragment {
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
|
||||
public static void hideKeyboardFrom(Activity activity) {
|
||||
InputMethodManager imm = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);
|
||||
//Find the currently focused view, so we can grab the correct window token from it.
|
||||
View view = activity.getCurrentFocus();
|
||||
//If no view currently has focus, create a new one, just so we can grab a window token from it
|
||||
if (view == null) {
|
||||
view = new View(activity);
|
||||
}
|
||||
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
|
||||
}
|
||||
private void postRequest() {
|
||||
int size = 100; // this is the count of the data items.
|
||||
int page = 1; // Which page do we want to get from the server.
|
||||
|
5
app/src/main/res/drawable-mdpi/btn_rounded_darker.xml
Normal file
5
app/src/main/res/drawable-mdpi/btn_rounded_darker.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="#B4B4B4"/>
|
||||
<corners android:radius="128dp"/>
|
||||
</shape>
|
5
app/src/main/res/drawable/btn_rounded.xml
Normal file
5
app/src/main/res/drawable/btn_rounded.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="#A3A3A3"/>
|
||||
<corners android:radius="128dp"/>
|
||||
</shape>
|
@@ -31,8 +31,9 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/magicbtn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="192dp"
|
||||
android:layout_height="44dp"
|
||||
android:background="@drawable/btn_rounded"
|
||||
android:text="I Understand"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/imageView3"
|
||||
app:layout_constraintEnd_toStartOf="@+id/imageView3"
|
||||
|
72
app/src/main/res/layout/fragment_send_feedback.xml
Normal file
72
app/src/main/res/layout/fragment_send_feedback.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".SendFeedbackFragment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/sendTo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:gravity="center"
|
||||
android:inputType="textEmailAddress"
|
||||
android:text="To: joshpatra12@protonmail.com"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.122"
|
||||
app:layout_constraintWidth_percent=".7" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/subject"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="Enter a subject for the email here"
|
||||
android:gravity="center"
|
||||
android:maxLength="30"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.284"
|
||||
app:layout_constraintWidth_percent=".90" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/EmailText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:gravity="center"
|
||||
android:hint="Please highlight what the bug was."
|
||||
android:inputType="textMultiLine"
|
||||
android:maxLength="429"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.6"
|
||||
app:layout_constraintWidth_percent=".95" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/sendEmail"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Send"
|
||||
android:background="@drawable/btn_rounded_darker"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias=".9" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -5,10 +5,6 @@
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.josh.trackcovid19v2.SettingsFragment">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/hello_blank_fragment" />
|
||||
|
||||
|
||||
</FrameLayout>
|
@@ -263,7 +263,7 @@
|
||||
android:textSize="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/text_totalCases"
|
||||
app:layout_constraintEnd_toEndOf="@+id/text_totalCases"
|
||||
app:layout_constraintHorizontal_bias="0.2"
|
||||
app:layout_constraintHorizontal_bias="0.1"
|
||||
app:layout_constraintStart_toStartOf="@+id/text_totalCases"
|
||||
app:layout_constraintTop_toTopOf="@+id/text_totalCases"
|
||||
app:layout_constraintVertical_bias="0.115" />
|
||||
|
@@ -210,7 +210,7 @@
|
||||
android:textSize="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/text_totalCases"
|
||||
app:layout_constraintEnd_toEndOf="@+id/text_totalCases"
|
||||
app:layout_constraintHorizontal_bias="0.2"
|
||||
app:layout_constraintHorizontal_bias="0.1"
|
||||
app:layout_constraintStart_toStartOf="@+id/text_totalCases"
|
||||
app:layout_constraintTop_toTopOf="@+id/text_totalCases"
|
||||
app:layout_constraintVertical_bias="0.115" />
|
||||
|
@@ -23,21 +23,22 @@
|
||||
android:icon="@drawable/stateiconfinal"
|
||||
android:title="@string/your_state" />
|
||||
</group>
|
||||
<!--
|
||||
|
||||
<group
|
||||
android:id="@+id/menu_bottom"
|
||||
android:checkableBehavior="none">
|
||||
|
||||
<!--
|
||||
<item
|
||||
android:id="@+id/nav_yoursettings"
|
||||
android:icon="@drawable/ic_action_name"
|
||||
android:title="@string/item" />
|
||||
-->
|
||||
<item
|
||||
android:id="@+id/nav_sendFeedback"
|
||||
android:icon="@drawable/ic_action_name2"
|
||||
android:title="@string/send_feedback"
|
||||
/>
|
||||
</group>
|
||||
-->
|
||||
|
||||
|
||||
</menu>
|
||||
|
@@ -30,4 +30,9 @@
|
||||
android:name="com.josh.trackcovid19v2.SettingsActivity$SettingsFragment"
|
||||
android:label="@string/menu_yoursettings"
|
||||
tools:layout="@layout/fragment_settings" />
|
||||
<fragment
|
||||
android:id="@+id/nav_sendFeedback"
|
||||
android:name="com.josh.trackcovid19v2.SendFeedbackFragment"
|
||||
android:label="@string/send_feedback"
|
||||
tools:layout="@layout/fragment_send_feedback" />
|
||||
</navigation>
|
@@ -16,7 +16,7 @@
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<!--
|
||||
<PreferenceCategory app:title="@string/sync_header">
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
@@ -31,5 +31,6 @@
|
||||
app:title="@string/attachment_title" />
|
||||
|
||||
</PreferenceCategory>
|
||||
-->
|
||||
|
||||
</PreferenceScreen>
|
||||
|
Reference in New Issue
Block a user