Watermarked in a few places.

Also removed some useless files.
This commit is contained in:
2020-05-03 17:11:31 -04:00
parent 58afe55d37
commit ffd65cd8d6
29 changed files with 68 additions and 142 deletions

View File

@@ -1,13 +1,12 @@
package com.josh.trackcovid19v2;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
/**
* A simple {@link Fragment} subclass.

View File

@@ -1,29 +0,0 @@
package com.josh.trackcovid19v2.ui.yourcountries;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;
import com.josh.trackcovid19v2.data.CountriesRepository;
import com.josh.trackcovid19v2.data.database.entity.Countries;
import com.josh.trackcovid19v2.model.ServiceRequest;
import java.util.List;
public class YourcountriesViewModel extends ViewModel {
private final CountriesRepository mRepository;
private final LiveData<List<Countries>> mCountriesData;
public YourcountriesViewModel(CountriesRepository mRepository) {
this.mRepository = mRepository;
this.mCountriesData = mRepository.getCountriesList();
}
public LiveData<List<Countries>> getCountriesList() {
return mCountriesData;
}
public void postRequest(ServiceRequest serviceRequest) {
mRepository.postServiceRequest(serviceRequest);
}
}

View File

@@ -28,9 +28,7 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.josh.trackcovid19v2.R;
import com.josh.trackcovid19v2.model.ServiceRequest;
import com.josh.trackcovid19v2.ui.viewmodel.YourcountriesViewModel;
import com.josh.trackcovid19v2.ui.viewmodel.YourrealcountryViewModel;
import com.josh.trackcovid19v2.ui.viewmodel.yourCountriesViewModelFactory;
import com.josh.trackcovid19v2.ui.viewmodel.yourrealcountryViewModelFactory;
import com.josh.trackcovid19v2.utility.InjectorUtils;
import com.squareup.picasso.Picasso;
@@ -64,7 +62,8 @@ public class YourrealcountryFragment extends Fragment {
postRequest();
new Handler().postDelayed(new Runnable() {
@Override public void run() {
@Override
public void run() {
// Stop animation (This will be after 3 seconds)
mSwipeRefreshLayout.setRefreshing(false);
}
@@ -132,6 +131,7 @@ public class YourrealcountryFragment extends Fragment {
spin.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
//Created by Josh Patra or souravp12 on Github.. This comment has been added to prevent people from stealing my work and publishing asdf it as their own.
rememberLocation[0] = position;
j[0] = 0;
Picasso.get().load(countries.get(position).flag).into(imageView);
@@ -163,7 +163,7 @@ public class YourrealcountryFragment extends Fragment {
String testsWithCommas = numberFormat.format(countries.get(position).tests);
String testsMilWithcommas = numberFormat.format(countries.get(position).testsPerMillion);
Date date = new Date(countries.get(position).updated);
textView13.setText(Html.fromHtml("Updated on "+ date));
textView13.setText(Html.fromHtml("Updated on " + date));
textView.setText(Html.fromHtml("<center><b>" + totalCasesWithCommas + "</b></center>"));
textView3.setText(Html.fromHtml("<b>" + deathWithCommas + "</b>"));
textView2.setText(Html.fromHtml("<b>" + recoveredWithCommas + "</b>"));
@@ -227,16 +227,14 @@ public class YourrealcountryFragment extends Fragment {
}
});
}
else{
Log.d("lol", "didn't work something broken inside one." + ", name: "+"not found at all");
} else {
Log.d("lol", "didn't work something broken inside one." + ", name: " + "not found at all");
}
});
}
else{
Log.d("lol", "didn't work something broken outside one." + ", name: "+"not found at all");
} else {
Log.d("lol", "didn't work something broken outside one." + ", name: " + "not found at all");
}
});
postRequest();

View File

@@ -1,29 +0,0 @@
package com.josh.trackcovid19v2.ui.yourrealcountry;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;
import com.josh.trackcovid19v2.data.CountriesRepository;
import com.josh.trackcovid19v2.data.database.entity.Countries;
import com.josh.trackcovid19v2.model.ServiceRequest;
import java.util.List;
public class YourrealcountryViewModel extends ViewModel {
private final CountriesRepository mRepository;
private final LiveData<List<Countries>> mCountriesData;
public YourrealcountryViewModel(CountriesRepository mRepository) {
this.mRepository = mRepository;
this.mCountriesData = mRepository.getCountriesList();
}
public LiveData<List<Countries>> getCountriesList() {
return mCountriesData;
}
public void postRequest(ServiceRequest serviceRequest) {
mRepository.postServiceRequest(serviceRequest);
}
}

View File

@@ -1,29 +0,0 @@
package com.josh.trackcovid19v2.ui.yourstate;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;
import com.josh.trackcovid19v2.data.StateRepository;
import com.josh.trackcovid19v2.data.database.entity.States;
import com.josh.trackcovid19v2.model.ServiceRequest;
import java.util.List;
public class YourstateViewModel extends ViewModel {
private final StateRepository mRepository;
private final LiveData<List<States>> mStatesData;
public YourstateViewModel(StateRepository mRepository) {
this.mRepository = mRepository;
this.mStatesData = mRepository.getStatesList();
}
public LiveData<List<States>> getStatesList() {
return mStatesData;
}
public void postRequest(ServiceRequest serviceRequest) {
mRepository.postServiceRequest(serviceRequest);
}
}

View File

@@ -34,8 +34,6 @@ import java.util.Locale;
public class YourworldFragment extends Fragment {
private static YourworldFragment BdTimeUtils;
private YourworldViewModel yourworldViewModel;
private com.josh.trackcovid19v2.ui.viewmodel.YourworldViewModel vYourworldViewModel;
private static DecimalFormat df = new DecimalFormat("0.00");

View File

@@ -1,24 +0,0 @@
package com.josh.trackcovid19v2.ui.yourworld;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class YourworldViewModel extends ViewModel {
private MutableLiveData<String> mText;
public YourworldViewModel() {
mText = new MutableLiveData<>();
mText.setValue("World Fragment");
}
public LiveData<String> getText() {
return mText;
}
public void setText(String str) {
mText.setValue(str);
}
}

View File

@@ -43,17 +43,31 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/virus"
app:layout_constraintHeight_percent=".12"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHeight_percent=".12"
app:layout_constraintWidth_percent=".20"/>
app:layout_constraintWidth_percent=".20" />
<ImageView
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/virus"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/imageView3"
app:layout_constraintHeight_percent=".12"
app:layout_constraintWidth_percent=".20"/>
app:layout_constraintTop_toTopOf="@+id/imageView3"
app:layout_constraintWidth_percent=".20" />
<!--
Created by Josh Patra or souravp12 on Github.. This comment has been added to prevent people from stealing my work and publishing it as their own.
-->
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Created by Josh Patra"
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.06" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -21,7 +21,9 @@
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer">
<!--
Created by Josh Patra or souravp12 on Github. Please credit other people for their work, and do not steal others work. This comment has been added to prevent people from stealing my work and publishing it as their own.
-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -5,7 +5,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.josh.trackcovid19v2.MainActivity">
<!--
Created by Josh Patra or souravp12 on Github.. This comment has been added to prevent people from stealing my work and publishing it as their own.
-->
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -6,7 +6,9 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:showIn="@layout/app_bar_main">
<!--
Created by Josh Patra or souravp12 on Github.. asdfasfasdfasdf This comment has been added to prevent people from stealing my work and publishing it as their own.
-->
<fragment
android:id="@+id/nav_host_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"

View File

@@ -4,7 +4,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.josh.trackcovid19v2.ui.yourcountries.YourcountriesFragment">
<!--
Created by Josh Patra or asdfas souravp12 on Github.. This comment has been added to prevent people from stealing my work and publishing it as their own.
-->
<com.evrencoskun.tableview.TableView
android:id="@+id/countries_TableView"
android:layout_width="match_parent"

View File

@@ -5,6 +5,9 @@
android:id="@+id/swiperefresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--
Created by Josh Patra or souravp12 on Github.. This comment has been added to prevent people from stealing my work and publishing it as their own.
-->
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@@ -336,19 +336,23 @@
app:layout_constraintStart_toStartOf="@+id/text_activeCases"
app:layout_constraintTop_toTopOf="@+id/text_activeCases"
app:layout_constraintVertical_bias=".67" />
<!--
Createdasd by Josh Patra or souravp12 on Github.. This comment has been added to prevent people from stealing my work and publishing it as their own.
-->
<TextView
android:id="@+id/text_updated"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:gravity="center"
android:text="Created by Josh Patra"
android:textAlignment="center"
android:textSize="15dp"
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=".97"
tools:ignore="DuplicateIds" />
<ImageView

View File

@@ -12,7 +12,9 @@
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<!--
Created by Josh Patra or souravp12 on Github.. This comment has been added to prevent people from stealing my work and publishing it as their own.
-->
<ImageView
android:id="@+id/imageView"
android:layout_width="95dp"

View File

@@ -8,12 +8,17 @@
android:layout_height="@dimen/table_view_cell_height"
android:background="@color/unselected_header_background_color"
android:orientation="vertical">
<!--
Created by Josh Patra or souravp12 on Github.. This comment has been added to prevent people from stealing my work and publishing it as their own. Random characters have also been added
in to prevent find and replace.
-->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<!--
Created by Josh Patra or souravp12 on Github.. This comment has been added to prevent people from stealing my work and publishing it as their own.
-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@@ -9,7 +9,9 @@
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:background="@color/separator_color"/>
<!--
Created by Josh Patra or souravp12 on Github.. This comment has been added to prevent people from stealing my work and publishing it as their own.
-->
<View
android:layout_width="match_parent"
android:layout_height="1px"

View File

@@ -7,7 +7,9 @@
android:layout_height="@dimen/table_view_cell_height"
android:background="@color/unselected_background_color"
android:orientation="vertical">
<!--
Created by Josh Patra or souravp12 on Github.. This comment has been added to prevent people from stealing my work and publishing it as their own.
-->
<org.fabiomsr.moneytextview.MoneyTextView
android:id="@+id/money_cell_data"

View File

@@ -5,7 +5,9 @@
android:layout_width="@dimen/table_view_row_header_width"
android:layout_height="@dimen/table_view_cell_height"
android:background="@color/unselected_header_background_color">
<!--
Created by Josh Patra or souravp12 on Github.. This comment has been added to prevent people from stealing my work and publishing it as their own.
-->
<LinearLayout
android:id="@+id/row_header_container"
android:layout_width="match_parent"