When I'm creating a new custom Preference class, is it allowed/advisable to use components from other views like this:XML :\[code\]<?xml version="1.0" encoding="utf-8"?><PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" ><ch.steff_94.morseapp_beta.PreferenceSeekBar android:text="ms" android:defaultValue="http://stackoverflow.com/questions/12610047/50" android:key="morse_speed" android:max="300" /></PreferenceScreen>\[/code\]Custom Preference :\[code\]public PreferenceSeekBar(Context context, AttributeSet attributes) { super(context, attributes); Context = context; String INDEX = "http://schemas.android.com/apk/res/android"; Unit = attributes.getAttributeValue(INDEX, "text"); DialogText = attributes.getAttributeValue(INDEX, "dialogMessage"); valueMax = attributes.getAttributeIntValue(INDEX, "max", 100); valueMin = attributes.getAttributeIntValue(INDEX, "defaultValue", 0); valueDefault = (valueMax-valueMin / 2);}\[/code\]