(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
package com.yourco.yourapp; | |
import java.util.ArrayList; | |
import java.util.List; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseAdapter; |
# Built application files | |
/*/build/ | |
# Crashlytics configuations | |
com_crashlytics_export_strings.xml | |
# Local configuration file (sdk path, etc) | |
local.properties | |
# Gradle generated files |
import java.util.ArrayList; | |
import java.util.List; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v4.app.FragmentPagerAdapter; | |
public class MyFragmentPageAdapter extends FragmentPagerAdapter { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
public class AdmobAdapter extends AbstractWrapAdapter<AdItem> { | |
private static final int SPAN = 10; | |
private boolean mShowAds = true; | |
public AdmobAdapter() { | |
super(Collections.singletonList(new AdItem())); | |
} | |
@Override | |
public boolean shouldInsertItemAtPosition(int position) { |
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="colorPrimary">@color/md_blue_500</color> | |
<color name="colorPrimaryDark">@color/md_blue_700</color> | |
<color name="colorPrimaryDeepDark">@color/md_blue_900</color> | |
<color name="colorAccent">@color/md_red_500</color> | |
<color name="md_red_50">#FFEBEE</color> | |
<color name="md_red_100">#FFCDD2</color> | |
<color name="md_red_200">#EF9A9A</color> |
/* | |
* Copyright (C) 2017 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
package com.miquelbeltran.accordion; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.widget.TextView; | |
public class Accordion extends Activity { | |
private static final int MENU_NEW_GAME = 1; |
The Material Components Library introduced with the 1.2.0-alpha03
the new ShapeableImageView
.
In your layout you can use:
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/image_view"
app:srcCompat="@drawable/..." />
Then in your code apply the ShapeAppearanceModel
to define your custom corners: