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.content.pm.PackageManager; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.Path; | |
import android.graphics.drawable.AdaptiveIconDrawable; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.graphics.drawable.Drawable; | |
import android.graphics.drawable.LayerDrawable; | |
import android.os.Build; |
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
String getNotificationText(Bundle extras) { | |
CharSequence[] lines = extras.getCharSequenceArray(Notification.EXTRA_TEXT_LINES); | |
if(lines != null && lines.length > 0) { | |
StringBuilder sb = new StringBuilder(); | |
for (CharSequence msg : lines) | |
if (!TextUtils.isEmpty(msg)) { | |
sb.append(msg.toString()); | |
sb.append('\n'); | |
} | |
return sb.toString().trim(); |
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
bottom_navigation_elevation | |
bottom_navigation_height | |
bottom_navigation_icon | |
bottom_navigation_margin_bottom | |
bottom_navigation_margin_top_active | |
bottom_navigation_margin_top_inactive | |
bottom_navigation_max_width | |
bottom_navigation_min_width | |
bottom_navigation_notification_elevation | |
bottom_navigation_notification_height |
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
/*https://www.youtube.com/watch?v=_JOapnq8hrs&t=852s | |
video tutorial for consent sdk android | |
*/ | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; |
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
def supportVersion = '27.1.1' | |
def retrofitVersion = '2.3.0' | |
def rxJavaVersion = '2.0.1' | |
def butterKnifeVersion = '8.8.1' | |
def daggerVersion = '2.13' | |
dependencies { | |
... | |
implementation "android.arch.lifecycle:extensions:1.1.1" |
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 class BaseApplication extends DaggerApplication { | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
} | |
@Override | |
protected AndroidInjector<? extends DaggerApplication> applicationInjector() { | |
ApplicationComponent component = DaggerApplicationComponent.builder().application(this).build(); |
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 abstract class BaseActivity extends DaggerAppCompatActivity { | |
@LayoutRes | |
protected abstract int layoutRes(); | |
@Override | |
protected void onCreate(@Nullable Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(layoutRes()); | |
ButterKnife.bind(this); |
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 abstract class BaseFragment extends DaggerFragment { | |
private Unbinder unbinder; | |
private AppCompatActivity activity; | |
@LayoutRes | |
protected abstract int layoutRes(); | |
@Override | |
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { |
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
@Module | |
public abstract class ActivityBindingModule { | |
@ContributesAndroidInjector(modules = {MainFragmentBindingModule.class}) | |
abstract MainActivity bindMainActivity(); | |
} |
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
@Module | |
public abstract class MainFragmentBindingModule { | |
@ContributesAndroidInjector | |
abstract ListFragment provideListFragment(); | |
@ContributesAndroidInjector | |
abstract DetailsFragment provideDetailsFragment(); | |
} |
OlderNewer