Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Miwok app: Category screen with pressed states
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/tan_background"
android:orientation="vertical"
tools:context="com.example.android.miwok.MainActivity">
<!-- Numbers category -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/category_numbers">
<TextView
android:id="@+id/numbers"
style="@style/CategoryStyle"
android:background="?android:attr/selectableItemBackground"
android:text="@string/category_numbers" />
</FrameLayout>
<!-- Family category -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/category_family">
<TextView
android:id="@+id/family"
style="@style/CategoryStyle"
android:background="?android:attr/selectableItemBackground"
android:text="@string/category_family" />
</FrameLayout>
<!-- Colors category -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/category_colors">
<TextView
android:id="@+id/colors"
style="@style/CategoryStyle"
android:background="?android:attr/selectableItemBackground"
android:text="@string/category_colors" />
</FrameLayout>
<!-- Phrases category -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/category_phrases">
<TextView
android:id="@+id/phrases"
style="@style/CategoryStyle"
android:background="?android:attr/selectableItemBackground"
android:text="@string/category_phrases" />
</FrameLayout>
</LinearLayout>

I have defined ripple effect in style.xml and it is not working. How to I get rid of it??

I have defined ripple effect in style.xml and it is not working. How to I get rid of it??

I have defined ripple effect in style.xml and it is not working. How to I get rid of it??

tomarv commented Feb 13, 2017

it is the same issue for me, no working

It works fine for me, could you print your code here, so we can see what it looks like?

Regards,

showing error

cabudies commented Jun 3, 2017

@saugatrai33
Well you don't need to add it to style.xml. Just copy and paste it to your already defined activity_main.xml. It will work.

Work fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment