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 Privacy Policy governs the manner in which our Egg Day Widget application collects, uses, maintains, and discloses information collected from users ("User") of the Home Screen Widget App. | |
Information Collection and Use | |
Our Egg Day Widget App does not collect any personally identifiable information from Users. However, it may collect non-personal identification information about Users whenever they interact with the Widget. Non-personal identification information may include the type of device, operating system, and other similar technical information. | |
Permissions | |
Our Egg Day Widget App may require certain permissions to function properly, such as access to device storage to save settings or preferences. These permissions are solely used for the intended functionality of the Widget and are not used to collect any personal information. | |
Data Security | |
We adopt appropriate data collection, storage, and processing practices and security measures to protect against unauthorized access, alteration, disclosure |
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
import android.Manifest | |
import android.content.Context | |
import android.content.pm.PackageManager | |
import android.location.Location | |
import android.os.Looper | |
import androidx.core.app.ActivityCompat | |
import androidx.lifecycle.LiveData | |
import com.google.android.gms.common.api.ApiException | |
import com.google.android.gms.location.* | |
import com.google.android.gms.maps.model.LatLng |
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
@AndroidEntryPoint | |
class SettingsFragment : Fragment() { | |
private val settingsViewModel: SettingsViewModel by viewModels() | |
// ... | |
} | |
class SettingsViewModel @ViewModelInject constructor() : ViewModel() { | |
// ... | |
} |
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
class CustomTextView : AppCompatTextView { | |
constructor(context: Context) : super(context) { | |
init(context) | |
} | |
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { | |
init(context, attrs) | |
} |
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
private RecyclerView.OnScrollListener recyclerViewOnScrollListener = new RecyclerView.OnScrollListener() { | |
@Override | |
public void onScrollStateChanged(RecyclerView recyclerView, int newState) { | |
super.onScrollStateChanged(recyclerView, newState); | |
} | |
@Override | |
public void onScrolled(RecyclerView recyclerView, int dx, int dy) { | |
super.onScrolled(recyclerView, dx, dy); | |
int visibleItemCount = layoutManager.getChildCount(); |
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
private Callback<VideosCollection> findVideosFirstFetchCallback = new Callback<VideosCollection>() { | |
@Override | |
public void onResponse(Call<VideosCollection> call, Response<VideosCollection> response) { | |
loadingImageView.setVisibility(View.GONE); | |
isLoading = false; | |
if (!response.isSuccessful()) { | |
int responseCode = response.code(); | |
if(responseCode == 504) { // 504 Unsatisfiable Request (only-if-cached) | |
errorTextView.setText("Can't load data.\nCheck your network connection."); |
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
private Callback<VideosCollection> findVideosNextFetchCallback = new Callback<VideosCollection>() { | |
@Override | |
public void onResponse(Call<VideosCollection> call, Response<VideosCollection> response) { | |
videosAdapter.removeFooter(); | |
isLoading = false; | |
if (!response.isSuccessful()) { | |
int responseCode = response.code(); | |
switch (responseCode){ | |
case 504: // 504 Unsatisfiable Request (only-if-cached) |
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
Subscription signInFieldsSubscription = | |
Observable.combineLatest(emailChangeObservable, passwordChangeObservable, | |
new Func2<CharSequence, CharSequence, Boolean>() { | |
@Override | |
public Boolean call(CharSequence email, CharSequence password) { | |
boolean isEmailValid = validateEmail(email.toString()); | |
boolean isPasswordValid = validatePassword(password.toString()); | |
return isEmailValid && isPasswordValid; | |
} |
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
Subscription passwordSubscription = | |
passwordChangeObservable | |
.doOnNext(new Action1<CharSequence>() { | |
@Override | |
public void call(CharSequence charSequence) { | |
hidePasswordError(); | |
} | |
}) | |
.debounce(400, TimeUnit.MILLISECONDS) | |
.filter(new Func1<CharSequence, Boolean>() { |
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
Subscription emailSubscription = | |
emailChangeObservable | |
.doOnNext(new Action1<CharSequence>() { | |
@Override | |
public void call(CharSequence charSequence) { | |
hideEmailError(); | |
} | |
}) | |
.debounce(400, TimeUnit.MILLISECONDS) | |
.filter(new Func1<CharSequence, Boolean>() { |
NewerOlder