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 boolean isValidEmail(CharSequence target) { | |
if (target == null) { | |
return false; | |
} else { | |
return android.util.Patterns.EMAIL_ADDRESS.matcher(target).matches(); | |
} | |
} |
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 ArrayList<StructContact> getContacts(Context context) { | |
if (!HelperPermission.grantedContactPermission()) { | |
return new ArrayList<>(); | |
} | |
String[] projectionPhones = { | |
ContactsContract.CommonDataKinds.Phone.LOOKUP_KEY, | |
ContactsContract.CommonDataKinds.Phone.NUMBER, |
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
public void getDevicePhotoFolders(Context context, WeakReference<FetchListener<List<GalleryAlbumModel>>> callback) { | |
//create new thread . process may take a seconds to load | |
new Thread(() -> { | |
//return empty list if context was null | |
List<GalleryAlbumModel> albums = new ArrayList<>(); | |
if (context == null) { | |
if(callback.get() != null) callback.get().onFetch(albums); |
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
public void getFolderPhotosById(Context context, String folderId, WeakReference<FetchListener<List<GalleryItemModel>>> callback) { | |
new Thread(() -> { | |
List<GalleryItemModel> photos = new ArrayList<>(); | |
if (context == null) { | |
if(callback.get() != null) callback.get().onFetch(photos); | |
return; | |
} |
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
package com.moviom.internal | |
import android.content.Context | |
import android.util.TypedValue | |
import com.moviom.R | |
import com.moviom.data.provider.PreferencesProvider | |
class Theme( | |
private val preferences: PreferencesProvider |
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
package com.moviom.ui | |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
import com.moviom.R | |
import com.moviom.internal.Navigator | |
import com.moviom.internal.Theme | |
import com.moviom.ui.pages.main.MainFragment | |
import com.moviom.ui.pages.splash.SplashFragment | |
import org.koin.android.ext.android.inject |
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
package com.moviom.ui | |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
import com.moviom.R | |
import com.moviom.internal.Navigator | |
import com.moviom.internal.Theme | |
import com.moviom.ui.pages.main.MainFragment | |
import com.moviom.ui.pages.splash.SplashFragment | |
import org.koin.android.ext.android.inject |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources xmlns:tools="http://schemas.android.com/tools"> | |
<style name="LightTheme" parent="BaseTheme"> | |
<item name="android:windowLightStatusBar" tools:targetApi="m">true</item> | |
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item> | |
<item name="android:navigationBarColor">@color/second_bg_light</item> | |
<item name="android:statusBarColor">@color/second_bg_light</item> | |
<item name="colorPrimary">@color/colorPrimary</item> | |
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<attr name="appDrawableBackground" format="reference"/> | |
<attr name="appBackground" format="reference|color"/> | |
<attr name="appSecondBackground" format="reference|color"/> | |
<attr name="appLinesColor" format="reference|color"/> | |
<attr name="appHitColor" format="reference|color"/> | |
<attr name="appTextTitleColor" format="reference|color"/> | |
<attr name="appTextSubTitleColor" format="reference|color"/> |
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 SmsReaderUtil @Inject constructor() { | |
private var smsReceiver: SmsReceiver? = null | |
fun register(activity: Activity?) { | |
smsReceiver = SmsReceiver() | |
activity?.let { | |
val intentFilter = IntentFilter(SmsRetriever.SMS_RETRIEVED_ACTION) | |
activity.registerReceiver(smsReceiver, intentFilter) | |
} |
OlderNewer