Skip to content

Instantly share code, notes, and snippets.

@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active March 15, 2024 06:39
FloatLabelLayout
/*
* Copyright 2014 Chris Banes
*
* 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
@hvisser
hvisser / layout.xml
Created July 24, 2013 15:58
Foreground selector maybe?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:addStatesFromChildren="true" // when any child has state_pressed, this container will also have!
android:orientation="vertical" android:background="@drawable/my_selector">
<ImageView android:clickable="true" .../>
<TextView android:clickable="true" .../>
</LinearLayout>