button

how to add buttons dynamically in Alert Box in Android

佐手、 提交于 2020-01-14 03:29:07
问题 I am developing android application in which for validations, it displays messages with alert box. I wanted to add buttons dynamically according to certain conditions. I like ask how to do this? I searched on Google, but couldn't find any suitable solutions. Any Suggestions are helpful. Thanks. 回答1: You can use a DialogFragment to acheive it. Create your own dialog view and inflate it in the onCreateView() of the dialog fragment. 回答2: if you know the possible buttons that could be displayed:

Tooltip is not displayed for a disabled html button in mozilla firefox

流过昼夜 提交于 2020-01-14 03:09:09
问题 Mozilla Firefox will not display tooltips of disabled controls. Is there another way to display them? I would prefer a solution without using javascript. There is an easy method I could find is to change in css styles is button, input { position: relative; width: 200px; } button[disabled]:hover:before, input[disabled]:hover:before { position: absolute; top: 10px; left: 10px; content: attr(title); background-color: #ffffe1; color: #000; line-height: 10pt; font-size: 8pt; border: 1px solid #000

Android: Positioning buttons when turned from portrait to landscape

瘦欲@ 提交于 2020-01-13 22:39:42
问题 I have a menu-activity, in which I have several positioned buttons. It fits my phone screen perfectly when in portrait mode, but in landscape mode it's destroyed. I know that when I have fixed positioning this will be the result. Can anyone tell me how to position my buttons so my activity keeps its form also in landscape mode? Thank you. Here is my xml file: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http:/

SharedPreferences save a button change invisible after click on it and let appears another button

只愿长相守 提交于 2020-01-13 20:48:08
问题 I'm new here. I'm french so maybe my english is not very good, sorry for that. I'm a beginner in Android development, I got to create an app for finish my study. I have an activity number 1 called VoeuxActivity.java with 8 buttons (and 8 TextViews), they are all VISIBLEs at the beginning, when an user click on one of them button change by INVISIBLE (user can't see the button after clicked on it), when I quit the app and I come back again on my app, the button is always invisible thanks to the

SharedPreferences save a button change invisible after click on it and let appears another button

放肆的年华 提交于 2020-01-13 20:48:07
问题 I'm new here. I'm french so maybe my english is not very good, sorry for that. I'm a beginner in Android development, I got to create an app for finish my study. I have an activity number 1 called VoeuxActivity.java with 8 buttons (and 8 TextViews), they are all VISIBLEs at the beginning, when an user click on one of them button change by INVISIBLE (user can't see the button after clicked on it), when I quit the app and I come back again on my app, the button is always invisible thanks to the

DataGrid button - Invalid Postback or Callback

孤街醉人 提交于 2020-01-13 20:40:11
问题 I have setup a DataGrid with a number of columns and a checkbox and column at the end of the row. I am also changing the layout of the datagrid on the OnItemCreated event which changes the layout of the datagrid by expanding the rows with the "Rowspan" attribute and remove the extra columns and controls where they are no longer required. The original datagrid layout was setup like this: ___________________________________________ | 1 | Employee Name | 01/08/10 |[] |[SAVE]| | 1 | Employee Name

Create Button on every touch on screen

老子叫甜甜 提交于 2020-01-13 19:32:18
问题 I want to make an application where whenever I touch the screen, which should be blank at the start, a button will be created and pop up onto the screen. So what I tried here is to make a button in main.xml and call it by id. Then I applied this method. public class TouchButtonActivity extends Activity { Button b; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); b=

SwiftUI Button interact with Map

让人想犯罪 __ 提交于 2020-01-13 19:22:31
问题 I'm totally new with Swift and SwiftUI and for a project group, I need to develop my first IOS app. I can display a map with Mapbox but I don't know how to follow my user when I click on a button. I don't know how to interact my button with my struct MapView This is my code: MapView.swift: import Mapbox struct MapView: UIViewRepresentable { let mapView: MGLMapView = MGLMapView(frame: .zero) func makeCoordinator() -> Coordinator { Coordinator(self) } func makeUIView(context:

Disable Button after Click whilst maintaining CausesValidation and an OnClick-Method

烂漫一生 提交于 2020-01-13 17:57:24
问题 So I've got this button: <asp:Button runat="server" ID="btnSubmit" meta:resourcekey="btnSubmit" CausesValidation="true" OnClick="btnSubmit_Click" /> meta:resourcekey is for Localization Resources, doesn't concern us here - as we can see it has got an OnClick-Method and causes Validation. That works fine, too, but I'd like to disable that button after the user clicked it so he/she can't click it multiple times before the PostBack succeeds, so here's what I did in Page_Load : btnSubmit

Is there a way to adjust the width of UITabBar button items to fit more than 5 buttons on the screen?

烂漫一生 提交于 2020-01-13 13:06:02
问题 My buttons seem stretched, especially in landscape orientation. I can't find a property to adjust either on the UITabBar, UITabBarViewController, or on the UITabBarItem's themselves. (Of course, one answer would be to get an iPad...but that doesn't solve the need for a phone.) For example, consider this simple Tab Bar Example - if I only could set the tab bar to auto-shrink as more buttons are added, or manually adjust the width to fit them all on the tab bar, I would be happy. 回答1: It is not