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 React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| // https://github.com/turo/react-fixed-bottom | |
| import FixedBottom from 'react-fixed-bottom'; | |
| const MyBottomBar = ({onLeftClick, onRightClick}) => ( | |
| <FixedBottom offset={20}> | |
| <div className="myBottomBar"> | |
| <button onClick={onLeftClick} type="button">Left</button> | |
| <button onClick={onRightClick} type="button">Right</button> |
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 React, {Component} from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import throttle from 'lodash.throttle'; | |
| const SAFARI_MOBILE_BOTTOM_MENU_HEIGHT = 44; | |
| export default class FixedBottom extends Component { | |
| static propTypes = { | |
| children: PropTypes.element.isRequired, | |
| offset: PropTypes.number, |
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
| /** | |
| * 44px is the height of the Safari overflow bar | |
| */ | |
| const SAFARI_MOBILE_BOTTOM_MENU_HEIGHT = 44; | |
| /** | |
| * Import from a library such as lodash or implement your own. Scroll events | |
| * should always be throttled or debounced. | |
| */ | |
| const throttle = () => {}; |
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 String getThumbnailUrl() { | |
| return "https://placeholdit.imgix.net/~text?txtsize=14&bg=" + thumbnailUrl.substring(thumbnailUrl.length() - 6, thumbnailUrl.length()) + "&txt=HELLOWORLD&w=150&h=150"; | |
| } |
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.toolodev.common.network; | |
| import android.content.Context; | |
| import android.graphics.Bitmap; | |
| import android.support.v4.util.LruCache; | |
| import com.android.volley.Request; | |
| import com.android.volley.RequestQueue; | |
| import com.android.volley.toolbox.ImageLoader; | |
| import com.android.volley.toolbox.Volley; |
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.arte.quicknotes.db; | |
| import android.content.Context; | |
| import android.database.sqlite.SQLiteDatabase; | |
| import android.database.sqlite.SQLiteOpenHelper; | |
| import android.provider.BaseColumns; | |
| public class NotesDbHelper extends SQLiteOpenHelper { | |
| // If you change the database schema, you must increment the database version. | |
| public static final int DATABASE_VERSION = 1; |
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.arte.quicknotes.db; | |
| import android.content.ContentValues; | |
| import android.content.Context; | |
| import android.database.Cursor; | |
| import android.database.SQLException; | |
| import android.database.sqlite.SQLiteDatabase; | |
| public class NotesDataSource implements NotesStorage{ |