This code how to replace the traditional radio-buttons, for custom images. You can do the same with checkboxes.
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example" | |
android:versionCode="1" | |
android:versionName="1.0"> | |
<uses-sdk android:minSdkVersion="8"/> | |
<uses-permission android:name="android.permission.READ_CONTACTS" /> | |
<application android:label="@string/app_name"> |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Collections.Specialized; | |
using System.Text; | |
// ASP.NET [C#] REDIRECT WITH POST DATA | |
public static class WebExtensions | |
{ |
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
// 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; |
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:
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 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; |
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
// 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)); | |
} |
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
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 |
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.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 { |
OlderNewer