The CSS could be placed in a separate file, which will be linked to your application or as it is in this sample project, in the head section of the document. Īs you could see all rules are explained with comments and you could easily find what should be changed in order to have your custom button. ms-background-position-x: -1px screen and (-webkit-min-device-pixel-ratio: 0) ms-background-position-y: -199px !important ms-background-position-x: 1px !important input.rbDecoratedīackground-position: left -200px !important īackground-position: right -160px !important * IE and Opera Focus and Active state fix with additional class, should be used !important */ rbVerticalButton.customHeight40:active input.rbDecorated rbVerticalButton.customHeight40:focus input.rbDecorated, * left rounded corner position active and focus states */ * right rounded corner position active and focus states */ rbVerticalButton.customHeight40:hover input.rbDecorated Step 2 Add the following code to res/layout/activitymain.xml. Step 1 Create a new project in Android Studio, go to File New Project and fill all required details to create a new project. * left rounded corner position hover state */ This example demonstrates how do I get the action bar height in android. * right rounded corner position hover state */ rbVerticalButton.customHeight40 input.rbDecorated, rbVerticalButton.customHeight40 input.rbDecoratedīackground-image: url(customHeight.gif) !important rbVerticalButton.customHeight40 input.rbDecorated (cutomHeight40, cutomHeight45, cutomHeight50), of course you could name the CSS classes on your choice. Using an additional CSS class will allow us to keep the 65px button and in the same time to create as many different height buttons as we need it e.g. This is done by using our additional CSS class - customHeight40. Now that we have the sprite, it is necessary to set new height to the button with the specific class and also set the new background positions. Fifth row contains active state rounded right corner background Sixth row contains central and left part of the button background. Third row contains hover state rounded right corner background fourth row contains central and left part of the button background. First row contains normal state rounded right corner background second row contains central and left part of the button background. The original RadButton sprite has six parts for the default button look. You could use Adobe Photoshop or another image editor software. Next step is to create a new image sprite, based on Telerik Default skin theme, where the button height is sized to 40px.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |