I hereby claim:
- I am sagaratalatti on github.
- I am ibitcoinist (https://keybase.io/ibitcoinist) on keybase.
- I have a public key ASBjsyJfcpPl9aBGsD6FgvXBBKPhyqLxJnez2kjhJi6FBwo
To claim this, I am signing this object:
| import React, { useState } from 'react'; | |
| import { FunctionTemplate, mintFunction, pauseFunction, unpauseFunction } from './functions'; | |
| const ContractBuilder: React.FC = () => { | |
| const [selectedFunction, setSelectedFunction] = useState<FunctionTemplate | null>(null); | |
| const [functionParams, setFunctionParams] = useState<Record<string, any>>({}); | |
| const functionTemplates = [mintFunction, pauseFunction, unpauseFunction]; | |
| const handleFunctionSelection = (func: FunctionTemplate) => { |
| // SPDX-License-Identifier: MIT | |
| // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) | |
| pragma solidity ^0.8.0; | |
| import "../utils/Context.sol"; | |
| /** | |
| * @dev Contract module which provides a basic access control mechanism, where | |
| * there is an account (an owner) that can be granted exclusive access to |
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity ^0.8.6; | |
| import "@openzeppelin/contracts/security/Pausable.sol"; | |
| import "@openzeppelin/contracts/access/Ownable.sol"; | |
| import "@openzeppelin/contracts/utils/math/SafeMath.sol"; | |
| import "@openzeppelin/contracts/utils/Context.sol"; | |
| import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; |
| pragma solidity ^0.6.12; | |
| // SPDX-License-Identifier: Unlicensed | |
| interface IERC20 { | |
| function totalSupply() external view returns (uint256); | |
| function balanceOf(address account) external view returns (uint256); | |
| function transfer(address recipient, uint256 amount) external returns (bool); |
| pragma solidity ^0.6.12; | |
| // SPDX-License-Identifier: Unlicensed | |
| library Address { | |
| function isContract(address account) internal view returns (bool) { | |
| bytes32 codehash; | |
| bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; | |
| assembly { codehash := extcodehash(account) } |
| pragma solidity ^0.6.12; | |
| library Address { | |
| function isContract(address account) internal view returns (bool) { | |
| bytes32 codehash; | |
| bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; | |
| assembly { codehash := extcodehash(account) } | |
| return (codehash != accountHash && codehash != 0x0); | |
| } |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
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:
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="daichan4649.lockoverlay" | |
| android:versionCode="1" | |
| android:versionName="1.0" > | |
| <uses-sdk | |
| android:minSdkVersion="15" | |
| android:targetSdkVersion="17" /> |