<style name="TopSheet_DialogAnimation">
<item name="android:windowEnterAnimation">@anim/slide_out_from_top</item>
<item name="android:windowExitAnimation">@anim/slide_back_to_top</item>
</style>
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
class BattleshipActivity: AppCompatActivity() { | |
private lateinit var gridAdpater: UiCellAdapter | |
private lateinit var myBoard: Board | |
private lateinit var otherBoard: Board | |
private val width: Int = 10 | |
override fun onCreate(savedInstanceState: Bundle?) { |
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
data class AppState(val searchState: SearchState = SearchState()) | |
class AppStore: Store<AppState>( | |
initialState = AppState(), | |
reducers = listOf(::reduceSearchState)) { | |
companion object { | |
val instance by lazy { | |
AppStore() | |
} |
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
public class ColorDetector extends ResourceXmlDetector { | |
private static final String ID = "CustomColors"; | |
private static final String DESCRIPTION = "Custom colors used"; | |
private static final String EXPLANATION = "Use pre-defined (allowed) colors only"; | |
private static final Category CATEGORY = Category.CORRECTNESS; | |
private static final int PRIORITY = 6; | |
private static final Severity SEVERITY = Severity.ERROR; | |
public static final Issue ISSUE = Issue.create( |
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
@LayoutSpec(events = { LikeChangeEvent.class }) | |
public class FullScreenComponentSpec { | |
... other stuff | |
@OnEvent(ClickEvent.class) | |
static void onLikeButtonClicked(ComponentContext c, @State boolean isLiked, @Prop GifItem gif, @Prop Component gifComponent) { | |
FullScreenComponent.updateLikeButtonAsync(c, !isLiked); | |
FullScreenComponent.dispatchLikeChangeEvent(FullScreenComponent.getLikeChangeEventHandler(c), !isLiked, gif.getId()); |
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
final EventDispatcher likeEventDispatcher = new EventDispatcher() { | |
@Override | |
public Object dispatchOnEvent(EventHandler eventHandler, Object eventState) { | |
// Do stuff here | |
return null; | |
} | |
}; | |
HasEventDispatcher hasEventDispatcher = new HasEventDispatcher() { | |
@Override |
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
@LayoutSpec | |
public class FullScreenComponentSpec { | |
@OnCreateInitialState | |
static void createInitialState(ComponentContext c, StateValue<Boolean> isLiked, @Prop boolean initLiked) { | |
isLiked.set(initLiked); | |
} | |
@OnCreateLayout | |
static ComponentLayout onCreateLayout(ComponentContext context, @Prop RequestManager glide, @Prop GifItem gif, @State boolean isLiked) { |
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
public class GifItem { | |
private final String id; | |
private final String image; | |
private final boolean isLiked; | |
public GifItem(JsonObject json, boolean isLiked) { | |
this.id = json.get("id").getAsString(); | |
JsonObject image = json.get("images").getAsJsonObject().get("original").getAsJsonObject(); | |
this.image = image.get("url").getAsString(); |
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
public class GifItem { | |
private final String id; | |
private final String image; | |
public GifItem(JsonObject json) { | |
this.id = json.get("id").getAsString(); | |
JsonObject image = json.get("images").getAsJsonObject().get("original").getAsJsonObject(); | |
this.image = image.get("url").getAsString(); | |
} |
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
Privacy Policy | |
Fenchtose built Lenx app as a commercial app. This SERVICE is provided by Fenchtose is intended for use as is. | |
This page is used to inform website visitors regarding my policies with the collection, use, and | |
disclosure of Personal Information if anyone decided to use my Service. | |
If you choose to use my Service, then you agree to the collection and use of information in | |
relation with this policy. The Personal Information that I collect are used for providing and | |
improving the Service. I will not use or share your information with anyone except as described | |
in this Privacy Policy. |
NewerOlder