This file contains hidden or 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.Color; | |
| import android.os.Bundle; | |
| import android.support.v4.widget.SwipeRefreshLayout; | |
| import android.support.v7.widget.DefaultItemAnimator; | |
| import android.support.v7.widget.LinearLayoutManager; | |
| import android.support.v7.widget.RecyclerView; | |
| import com.togethernetworks.basesdk.BaseActivity; | |
| import com.togethernetworks.gallery.samples.mortar.UiModule; |
This file contains hidden or 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.myapplication" > | |
| <application | |
| android:allowBackup="true" | |
| android:icon="@drawable/ic_launcher" | |
| android:label="@string/app_name" | |
| android:theme="@style/AppTheme" > | |
| <activity |
This file contains hidden or 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.ryanharter.android.util; | |
| import android.content.Context; | |
| import android.content.SharedPreferences; | |
| /** | |
| * Keeps track of the number of app launches, and days since first launch, and | |
| * provides an easy way to determine whether you should show a rating prompt | |
| * or not. | |
| */ |
This file contains hidden or 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 HelperUtil { | |
| private final HelperUtilImpl mImpl; | |
| public HelperUtil (Context context) { | |
| if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) { | |
| mImpl = new HelperUtilImplL(context); | |
| } else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) { | |
| mImpl = new HelperUtilImplKK(context); |
This file contains hidden or 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 HelperUtil { | |
| public static HelperUtilBase getInstance(Context context) { | |
| if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) { | |
| return new HelperUtilL(context); | |
| } else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) { | |
| return new HelperUtilKK(context); | |
| } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { | |
| return new HelperUtilJB(context); |
This file contains hidden or 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
| /* | |
| * Copyright (C) 2014 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 |
This file contains hidden or 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"?> | |
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| android:background="@android:color/white" | |
| android:orientation="vertical" | |
| android:windowMinWidthMajor="@android:dimen/dialog_min_width_major"> | |
| <LinearLayout |
This file contains hidden or 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
| /* | |
| * Copyright (C) 2014 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 |
This file contains hidden or 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 toCamelCase(String string) { | |
| String result = "" | |
| string.findAll("[^\\W]+") { String word -> | |
| result += word.capitalize() | |
| } | |
| return result | |
| } | |
| afterEvaluate { project -> | |
| Configuration runtimeConfiguration = project.configurations.getByName('compile') |
This file contains hidden or 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 MainActivity extends Activity { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.layoutfab); | |
| //Outline | |
| int size = getResources().getDimensionPixelSize(R.dimen.fab_size); | |
| Outline outline = new Outline(); |