Skip to content

Instantly share code, notes, and snippets.

@mohlendo
mohlendo / i18n.component.ts
Last active December 11, 2019 01:35
Angular i18n translations outside a template - JIT only
import { Component } from '@angular/core'
@Component({
selector: 'i18n',
moduleId: module.id,
template: `<span i18n="@@foobar">Hello {{placeholder}}!</span>`
})
export class I18NComponent {
placeholder: any
}
@mohlendo
mohlendo / ReorderRecyclerView.java
Created November 26, 2014 14:05
A RecylcerView that can be reordered with drag&drop. Heavily inspired by https://www.youtube.com/watch?v=_BZIvjMgH-Q A complete example can be found here: https://github.com/mohlendo/ReorderRecyclerView
/*
* Copyright (C) 2014 I.C.N.H GmbH
*
* 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