mirror of
https://github.com/SoPat712/TrackCovid19.git
synced 2025-08-22 02:38:45 -04:00
Watermarked in a few places.
Also removed some useless files.
This commit is contained in:
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.
@@ -1,13 +1,12 @@
|
|||||||
package com.josh.trackcovid19v2;
|
package com.josh.trackcovid19v2;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple {@link Fragment} subclass.
|
* A simple {@link Fragment} subclass.
|
||||||
|
@@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -28,9 +28,7 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
|||||||
|
|
||||||
import com.josh.trackcovid19v2.R;
|
import com.josh.trackcovid19v2.R;
|
||||||
import com.josh.trackcovid19v2.model.ServiceRequest;
|
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.YourrealcountryViewModel;
|
||||||
import com.josh.trackcovid19v2.ui.viewmodel.yourCountriesViewModelFactory;
|
|
||||||
import com.josh.trackcovid19v2.ui.viewmodel.yourrealcountryViewModelFactory;
|
import com.josh.trackcovid19v2.ui.viewmodel.yourrealcountryViewModelFactory;
|
||||||
import com.josh.trackcovid19v2.utility.InjectorUtils;
|
import com.josh.trackcovid19v2.utility.InjectorUtils;
|
||||||
import com.squareup.picasso.Picasso;
|
import com.squareup.picasso.Picasso;
|
||||||
@@ -64,7 +62,8 @@ public class YourrealcountryFragment extends Fragment {
|
|||||||
|
|
||||||
postRequest();
|
postRequest();
|
||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(new Runnable() {
|
||||||
@Override public void run() {
|
@Override
|
||||||
|
public void run() {
|
||||||
// Stop animation (This will be after 3 seconds)
|
// Stop animation (This will be after 3 seconds)
|
||||||
mSwipeRefreshLayout.setRefreshing(false);
|
mSwipeRefreshLayout.setRefreshing(false);
|
||||||
}
|
}
|
||||||
@@ -132,6 +131,7 @@ public class YourrealcountryFragment extends Fragment {
|
|||||||
spin.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
spin.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
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;
|
rememberLocation[0] = position;
|
||||||
j[0] = 0;
|
j[0] = 0;
|
||||||
Picasso.get().load(countries.get(position).flag).into(imageView);
|
Picasso.get().load(countries.get(position).flag).into(imageView);
|
||||||
@@ -227,15 +227,13 @@ public class YourrealcountryFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
Log.d("lol", "didn't work something broken inside one." + ", name: " + "not found at all");
|
Log.d("lol", "didn't work something broken inside one." + ", name: " + "not found at all");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
Log.d("lol", "didn't work something broken outside one." + ", name: " + "not found at all");
|
Log.d("lol", "didn't work something broken outside one." + ", name: " + "not found at all");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -34,8 +34,6 @@ import java.util.Locale;
|
|||||||
|
|
||||||
public class YourworldFragment extends Fragment {
|
public class YourworldFragment extends Fragment {
|
||||||
|
|
||||||
private static YourworldFragment BdTimeUtils;
|
|
||||||
private YourworldViewModel yourworldViewModel;
|
|
||||||
private com.josh.trackcovid19v2.ui.viewmodel.YourworldViewModel vYourworldViewModel;
|
private com.josh.trackcovid19v2.ui.viewmodel.YourworldViewModel vYourworldViewModel;
|
||||||
private static DecimalFormat df = new DecimalFormat("0.00");
|
private static DecimalFormat df = new DecimalFormat("0.00");
|
||||||
|
|
||||||
|
@@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -43,9 +43,9 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:background="@drawable/virus"
|
android:background="@drawable/virus"
|
||||||
|
app:layout_constraintHeight_percent=".12"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintHeight_percent=".12"
|
|
||||||
app:layout_constraintWidth_percent=".20" />
|
app:layout_constraintWidth_percent=".20" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@@ -53,7 +53,21 @@
|
|||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:background="@drawable/virus"
|
android:background="@drawable/virus"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/imageView3"
|
|
||||||
app:layout_constraintHeight_percent=".12"
|
app:layout_constraintHeight_percent=".12"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/imageView3"
|
||||||
app:layout_constraintWidth_percent=".20" />
|
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>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -21,7 +21,9 @@
|
|||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
app:headerLayout="@layout/nav_header_main"
|
app:headerLayout="@layout/nav_header_main"
|
||||||
app:menu="@menu/activity_main_drawer">
|
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
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@@ -5,7 +5,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="com.josh.trackcovid19v2.MainActivity">
|
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
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@@ -6,7 +6,9 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||||
tools:showIn="@layout/app_bar_main">
|
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
|
<fragment
|
||||||
android:id="@+id/nav_host_fragment"
|
android:id="@+id/nav_host_fragment"
|
||||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
|
@@ -4,7 +4,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="com.josh.trackcovid19v2.ui.yourcountries.YourcountriesFragment">
|
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
|
<com.evrencoskun.tableview.TableView
|
||||||
android:id="@+id/countries_TableView"
|
android:id="@+id/countries_TableView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@@ -5,6 +5,9 @@
|
|||||||
android:id="@+id/swiperefresh"
|
android:id="@+id/swiperefresh"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="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
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@@ -336,19 +336,23 @@
|
|||||||
app:layout_constraintStart_toStartOf="@+id/text_activeCases"
|
app:layout_constraintStart_toStartOf="@+id/text_activeCases"
|
||||||
app:layout_constraintTop_toTopOf="@+id/text_activeCases"
|
app:layout_constraintTop_toTopOf="@+id/text_activeCases"
|
||||||
app:layout_constraintVertical_bias=".67" />
|
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
|
<TextView
|
||||||
android:id="@+id/text_updated"
|
android:id="@+id/text_updated"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:text="Created by Josh Patra"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textSize="15dp"
|
android:textSize="15dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias=".97"
|
||||||
tools:ignore="DuplicateIds" />
|
tools:ignore="DuplicateIds" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@@ -12,7 +12,9 @@
|
|||||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
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
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/imageView"
|
||||||
android:layout_width="95dp"
|
android:layout_width="95dp"
|
||||||
|
@@ -8,12 +8,17 @@
|
|||||||
android:layout_height="@dimen/table_view_cell_height"
|
android:layout_height="@dimen/table_view_cell_height"
|
||||||
android:background="@color/unselected_header_background_color"
|
android:background="@color/unselected_header_background_color"
|
||||||
android:orientation="vertical">
|
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
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal">
|
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
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@@ -9,7 +9,9 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:background="@color/separator_color"/>
|
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
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
|
@@ -7,7 +7,9 @@
|
|||||||
android:layout_height="@dimen/table_view_cell_height"
|
android:layout_height="@dimen/table_view_cell_height"
|
||||||
android:background="@color/unselected_background_color"
|
android:background="@color/unselected_background_color"
|
||||||
android:orientation="vertical">
|
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
|
<org.fabiomsr.moneytextview.MoneyTextView
|
||||||
android:id="@+id/money_cell_data"
|
android:id="@+id/money_cell_data"
|
||||||
|
@@ -5,7 +5,9 @@
|
|||||||
android:layout_width="@dimen/table_view_row_header_width"
|
android:layout_width="@dimen/table_view_row_header_width"
|
||||||
android:layout_height="@dimen/table_view_cell_height"
|
android:layout_height="@dimen/table_view_cell_height"
|
||||||
android:background="@color/unselected_header_background_color">
|
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
|
<LinearLayout
|
||||||
android:id="@+id/row_header_container"
|
android:id="@+id/row_header_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Reference in New Issue
Block a user