user-interface

Disable clicks when fragment adding animation playing

☆樱花仙子☆ 提交于 2021-02-07 18:15:25
问题 I have a method, which perform a fragment adding animation and a new fragment fills all screen: public void addFragmentWithAnimation(Fragment fragment, boolean addToBackStack){ FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); transaction.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_right, R.anim.slide_in_left, R.anim.slide_out_right); if (addToBackStack) { transaction.addToBackStack(null); } transaction.add(R.id.lay_fragments, fragment);

TextView as a progressbar with textcolor minipulation?

时光毁灭记忆、已成空白 提交于 2021-02-07 18:14:54
问题 I'm working on improving my app's UI. And in the design I'm using I have a TextView that will act as a progress bar at certain time. The ruslt should look like this : The thing is that parts of text will change their color while the progress is changing I looked into spannablestring in android it would work if I can find the letters that are covered by the progress ( but I don't think this would be easy/accurate) What I'm planning todo now is to use the following: FrameLayout with :

Python tkinter Entry widget status switch via Radio buttons

南楼画角 提交于 2021-02-07 14:44:27
问题 a simple question (not so simple for a tkinter newby like me): I'm building a GUI and I want to have two radio buttons driving the status (enabled or disabled) of an Entry widget, into which the user will input data. When the first radio button is pressed, I want the Entry to be disabled; when the second radio button is pressed, I want the Entry to be disabled. Here is my code: from Tkinter import * root = Tk() frame = Frame(root) #callbacks def enableEntry(): entry.configure(state=ENABLED)

Python tkinter Entry widget status switch via Radio buttons

喜你入骨 提交于 2021-02-07 14:43:59
问题 a simple question (not so simple for a tkinter newby like me): I'm building a GUI and I want to have two radio buttons driving the status (enabled or disabled) of an Entry widget, into which the user will input data. When the first radio button is pressed, I want the Entry to be disabled; when the second radio button is pressed, I want the Entry to be disabled. Here is my code: from Tkinter import * root = Tk() frame = Frame(root) #callbacks def enableEntry(): entry.configure(state=ENABLED)

Python tkinter Entry widget status switch via Radio buttons

无人久伴 提交于 2021-02-07 14:43:26
问题 a simple question (not so simple for a tkinter newby like me): I'm building a GUI and I want to have two radio buttons driving the status (enabled or disabled) of an Entry widget, into which the user will input data. When the first radio button is pressed, I want the Entry to be disabled; when the second radio button is pressed, I want the Entry to be disabled. Here is my code: from Tkinter import * root = Tk() frame = Frame(root) #callbacks def enableEntry(): entry.configure(state=ENABLED)

Android-O launch on secondary display

十年热恋 提交于 2021-02-07 14:29:18
问题 The new ActivityOptions setLaunchDisplayId (int launchDisplayId) function in Android-O seems to always crash my app when I try to launch an activity intent. Both when I launch activities from my own app and when I try to launch other apps i.e. Chrome Canary. Does anyone know if this is a general problem with the new API's or am I missing something: A small snippet of my code is below: options.setLaunchDisplayId(1); startActivity(intent, options); NOTE I was testing with 'simulate a second

Android-O launch on secondary display

岁酱吖の 提交于 2021-02-07 14:26:59
问题 The new ActivityOptions setLaunchDisplayId (int launchDisplayId) function in Android-O seems to always crash my app when I try to launch an activity intent. Both when I launch activities from my own app and when I try to launch other apps i.e. Chrome Canary. Does anyone know if this is a general problem with the new API's or am I missing something: A small snippet of my code is below: options.setLaunchDisplayId(1); startActivity(intent, options); NOTE I was testing with 'simulate a second

highlighting custom QWidgetAction on hover

喜欢而已 提交于 2021-02-07 13:34:44
问题 My application has a QMenuBar with a number of QMenu s, each of which having a number of QAction s and sub- QMenu s. Most of the QAction -items are derivatives of QWidgetAction with re-implemented QWidgetAction::createWidget methods. Usually, both QAction s and QMenu become highlighted on mouse hover. Even a QWidgetAction doesn't make trouble until here: But as soon as I override QWidgetAction::createWidget to return a custom QWidget QWidget* MyWidgetAction::createWidget(QWidget* parent) {

highlighting custom QWidgetAction on hover

旧街凉风 提交于 2021-02-07 13:34:14
问题 My application has a QMenuBar with a number of QMenu s, each of which having a number of QAction s and sub- QMenu s. Most of the QAction -items are derivatives of QWidgetAction with re-implemented QWidgetAction::createWidget methods. Usually, both QAction s and QMenu become highlighted on mouse hover. Even a QWidgetAction doesn't make trouble until here: But as soon as I override QWidgetAction::createWidget to return a custom QWidget QWidget* MyWidgetAction::createWidget(QWidget* parent) {

Calling Select() on WPF text box doesn't do anything

妖精的绣舞 提交于 2021-02-07 12:24:15
问题 I'm using a WPF TextBox, and I'm calling the Select() method to make a selection. Unfortunately, it doesn't seem to work unless I select something manually first. Can someone suggest as to why it happens? 回答1: Does your textbox have focus when you call the Select method? The selection will not show unless it has focus, but the common way for the textbox to get focus is by clicking on it...which deselects the text. This behaviour could give the impression that it's not working. Calling TextBox