This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
This document now exists on the official ASP.NET core docs page.
| //Without sending arguments | |
| //Subscribe | |
| MessagingCenter.Subscribe<object> (this, "Arrived", (sender) => { | |
| // do something whenever the "Arrived" message is sent from whatever type | |
| //<object> is. | |
| }); | |
| //Send | |
| //All subscribers to "Arrived" of type "this" will be notified. |
| import android.graphics.Bitmap; | |
| import android.graphics.drawable.BitmapDrawable; | |
| import android.graphics.drawable.Drawable; | |
| import java.io.ByteArrayOutputStream; | |
| /** | |
| * Sketch Project Studio | |
| * Created by Angga on 12/04/2016 14.27. | |
| */ | |
| public class AppHelper { |
| using ProjectTest.MyModels; | |
| using SQLite.Net; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using Xamarin.Forms; | |
| namespace ProjectTest.Database |
| // TODO add <meta-data android:value="GlideModule" android:name="....OkHttpProgressGlideModule" /> | |
| // TODO add <meta-data android:value="GlideModule" tools:node="remove" android:name="com.bumptech.glide.integration.okhttp.OkHttpGlideModule" /> | |
| // or not use 'okhttp@aar' in Gradle depdendencies | |
| public class OkHttpProgressGlideModule implements GlideModule { | |
| @Override public void applyOptions(Context context, GlideBuilder builder) { } | |
| @Override public void registerComponents(Context context, Glide glide) { | |
| OkHttpClient client = new OkHttpClient(); | |
| client.networkInterceptors().add(createInterceptor(new DispatchingProgressListener())); | |
| glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(client)); | |
| } |
| package im.ene.lab.android.widgets; | |
| import android.content.Context; | |
| import android.graphics.PorterDuff; | |
| import android.graphics.drawable.Drawable; | |
| import android.os.Build; | |
| import android.support.annotation.NonNull; | |
| import android.support.annotation.Nullable; | |
| import android.support.design.widget.TabLayout; | |
| import android.util.AttributeSet; |
You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.
The RecyclerView should use a LinearLayoutManager.
You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)
This is a porting of the class SimpleSectionedListAdapter provided by Google
Example:
| // Note that a shortcut is created automagically if the app is installed via Play store. | |
| // Change "APP_NAME" by your app name. *MrObvious* | |
| /*Manifest file - add this */ | |
| <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" /> | |
| /* MainActivity.java */ | |
| public class MainActivity ... { | |
| ... | |
| private SharedPreferences appSettings; |