Created
November 24, 2011 17:33
-
-
Save jimmyjjames/1391862 to your computer and use it in GitHub Desktop.
Android Theming Test
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.theming" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk android:minSdkVersion="11" /> | |
<application | |
android:icon="@drawable/ic_launcher" | |
android:label="@string/app_name" > | |
<activity | |
android:label="@string/app_name" | |
android:name=".ThemingTesterActivity" | |
android:theme="@style/Theme.Custom" | |
> | |
<intent-filter > | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
</activity> | |
</application> | |
</manifest> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<declare-styleable name="CustomImageButton"> | |
<attr name="customeAttr" format="string"/> | |
</declare-styleable> | |
<declare-styleable name="CustomTheme"> | |
<attr name="customImageButtonStyle" format="reference"/> | |
</declare-styleable> | |
</resources> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources | |
xmlns:custom="http://schemas.android.com/apk/res/com.example.theming" | |
> | |
<style name="Widget.ImageButton.Custom" parent="android:style/Widget.ImageButton"> | |
<!-- | |
<item name="custom:customAttr">some value</item> | |
--> | |
<item name="customAttr">some value</item> | |
<item name="android:background">#ff00ff00</item> | |
</style> | |
</resources> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources | |
xmlns:custom="http://schemas.android.com/apk/res/com.example.theming" | |
> | |
<style name="Theme.Custom" parent="@android:style/Theme"> | |
<!-- | |
<item name="custom:customImageButtonStyle">@custom:style/Widget_ImageButton_Custom</item> | |
--> | |
<item name="customImageButtonStyle">@style/Widget_ImageButton_Custom</item> | |
</style> | |
</resources> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment