imagebutton

How To Use Multiple TouchDelegate

限于喜欢 提交于 2019-12-17 19:22:43
问题 i have two ImageButtons, each inside a RelativeLayout and these two RelativeLayouts are in another RelativeLayout, i want to set TouchDelegate for each ImageButton. If normally i add TouchDelegate to each ImageButton and it's parent RelativeLayout then just one ImageButton works properly, Another one doesn't extend it's clicking area. So PLease help me on how to use TouchDelegate in both ImageButtons. If it's not possible then what can be a effective way to extend the clicking area of a view?

How to show the text on a ImageButton?

限于喜欢 提交于 2019-12-17 15:21:06
问题 I have an ImageButton and I want to show a text and an image on it. But when I try on emulator: <ImageButton android:text="OK" android:id="@+id/buttonok" android:src="@drawable/buttonok" android:layout_width="match_parent" android:layout_height="wrap_content" /> I get the image but without the text. How can I show the text? Please help me! 回答1: As you can't use android:text I recommend you to use a normal button and use one of the compound drawables. For instance: <Button android:id="@+id

How to place button inside of edit text

前提是你 提交于 2019-12-17 15:16:24
问题 I want to place an image button inside of EditText, but I don't have Idea please tell me how to do so as shown in the figure . Thanks 回答1: If You dont want click on that Image, Then you can use drawableRight property for EditText.. android:drawableRight="@drawable/icon" If you want click then use below code. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content"

Difference between a clickable ImageView and ImageButton

烂漫一生 提交于 2019-12-17 07:06:06
问题 I'm just wondering if there is any significant difference between an ImageView that's set to be clickable, compared with an ImageButton ? Is there any reason for using one over the other? Is there any restriction on the drawable for an ImageButton that leaves ImageView as the only possible option? Will I possibly lose any functionality of a button if I opt for a clickable ImageView over ImageButton ? 回答1: There's no differences, except default style. ImageButton has a non-null background by

jQuery UI Dialog - missing close icon

我是研究僧i 提交于 2019-12-17 06:23:33
问题 I'm using a custom jQuery 1.10.3 theme. I downloaded every straight from the theme roller and I have intentionally not changed anything. I create a dialog box and I get an empty gray square where the close icon should be: I compared the code that is generated on my page: <div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix"> <spanid="ui-id-2" class="ui-dialog-title">Title</span> <button class="ui-dialog-titlebar-close"></button> </div> to the code generated on the

Fit Image in ImageButton in Android

烈酒焚心 提交于 2019-12-17 04:10:58
问题 I have 6 ImageButton in my activity, I set images through my code in them ( not using xml). I want them to cover 75% of the button area. But where as some images cover less area, some are too big to fit into the imageButton. How to programatically resize and show them? Below is the screen shot below is the xml-file <?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="match

jquery mobile fullcalendar prev next icon

北城以北 提交于 2019-12-14 00:07:41
问题 When using the jquery fullcalendar plugin (http://arshaw.com/fullcalendar/) with jquery mobile, the prev and next month button icons only show the arrow-up background image, which is the very first icon on the long 256 by 240 .png image file. When I refresh the page in Firefox, the correct arrow east and west show up, yet I lose all other styles including background, themes, etc. Refresh does not work in IE. I searched high and low for an answer to this relatively minor issue. Here I believe

Conditionally change imageButton image

Deadly 提交于 2019-12-13 18:01:44
问题 I have an imageButton inside a listview and I want to change its image depending on two cases. In the first case the imagebutton is enabled and has an image. In the second case the imagebutton is disabled and should have a different image. public View getView(int position, View convertView, ViewGroup parent) { View vi=convertView; if(convertView==null) vi = inflater.inflate(R.layout.list_row, null); TextView title = (TextView)vi.findViewById(R.id.title); TextView retail_price = (TextView)vi

How to open a webview from imagebutton?

核能气质少年 提交于 2019-12-13 17:53:22
问题 I have three buttons in a fragment that when the user clicks on one it'll open a specific webpage within the application. When I try to run this code on the phone it crashes when I try to access the tab. My .java class is right here: public class SocialMediaFragment extends Fragment { public ImageButton fbbutton; public ImageButton twbutton; public ImageButton igbutton; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView

Refresh page when press enter

旧时模样 提交于 2019-12-13 17:17:13
问题 My code has few <asp:ImageButton> . But I want to make when I press Enter key, not others change but only submit button works . Now, when I press Enter key in my code , .calendar class button works and calendar come out. jquery $('form').keypress(function (e) { if (e.which == 13) { $('.submit').submit(); //return false; } }); .aspx <div id="form"> <div id="main"> <div> <ul> <li> <asp:TextBox ID="txtDate1" runat="server" CssClass="textbox"></asp:TextBox> <asp:ImageButton ID="Button1" CssClass=