Questions tagged [user-interface]

User Interface (UI) is the system through which people interact with a computer. This tag can be used for UI-related programming questions. Note that there's a separate Stack Exchange site for User Interfaces, Interactions with the Computer and User Experience design: https://ux.stackexchange.com.

User Interface (UI) is the system through which people interact with a computer. This tag can be used for UI-related programming questions.

Note that there's a separate Stack Exchange site for User Interfaces, and Interaction- and User Experience design.

References

56892 questions
6334
votes
32 answers

What is the difference between px, dip, dp, and sp?

What is the difference between the units of measure px, dip, dp, and sp?
2351
votes
24 answers

What are MVP and MVC and what is the difference?

When looking beyond the RAD (drag-drop and configure) way of building user interfaces that many tools encourage you are likely to come across three design patterns called Model-View-Controller, Model-View-Presenter and Model-View-ViewModel. My…
1575
votes
47 answers

How do I update the GUI from another thread?

Which is the simplest way to update a Label from another Thread? I have a Form running on thread1, and from that I'm starting another thread (thread2). While thread2 is processing some files I would like to update a Label on the Form with the…
CruelIO
  • 18,196
  • 16
  • 40
  • 58
1056
votes
23 answers

How to create RecyclerView with multiple view types

From Create dynamic lists with RecyclerView: When we create a RecyclerView.Adapter we have to specify ViewHolder that will bind with the adapter. public class MyAdapter extends RecyclerView.Adapter { private String[]…
Pongpat
  • 13,248
  • 9
  • 38
  • 51
674
votes
18 answers

How do I align views at the bottom of the screen?

Here's my layout code;
gav
  • 29,022
  • 23
  • 65
  • 90
584
votes
15 answers

Difference between a View's Padding and Margin

What is the difference between a View's Margin and Padding?
Ragunath Jawahar
  • 19,513
  • 22
  • 110
  • 155
554
votes
37 answers

Create a rounded button / button with border-radius in Flutter

I'm currently developing an Android app in Flutter. How can I add a rounded button?
Kingsley CA
  • 10,685
  • 10
  • 26
  • 39
548
votes
9 answers

The Use of Multiple JFrames: Good or Bad Practice?

I'm developing an application which displays images, and plays sounds from a database. I'm trying to decide whether or not to use a separate JFrame to add images to the database from the GUI. I'm just wondering whether it is good practice to use…
Peddler
  • 6,045
  • 4
  • 18
  • 22
537
votes
18 answers

How can I add a border to a widget in Flutter?

I'm using Flutter and I'd like to add a border to a widget (in this case, a Text widget). I tried TextStyle and Text, but I didn't see how to add a border.
Seth Ladd
  • 112,095
  • 66
  • 196
  • 279
489
votes
6 answers

Declaring a custom android UI element using XML

How do I declare an Android UI element using XML?
Casebash
  • 114,675
  • 90
  • 247
  • 350
487
votes
11 answers

What is Linux’s native GUI API?

Both Windows (Win32 API) and OS X (Cocoa) have their own APIs to handle windows, events and other OS stuff. I have never really got a clear answer as to what Linux’s equivalent is? I have heard some people say GTK+, but GTK+ being cross platform.…
DavidColson
  • 8,387
  • 9
  • 37
  • 50
476
votes
35 answers

How do I display the current value of an Android Preference in the Preference summary?

This must come up very often. When the user is editing preferences in an Android app, I'd like them to be able to see the currently set value of the preference in the Preference summary. Example: if I have a Preference setting for "Discard old…
nyenyec
  • 7,138
  • 9
  • 29
  • 15
434
votes
24 answers

Flutter - Wrap text on overflow, like insert ellipsis or fade

I'm trying to create a line in which center text has a maximum size, and if the text content is too large, it fits in size. I insert the TextOverflow.ellipsis property to shorten the text and inserting the triple points ... but it is not…
rafaelcb21
  • 12,422
  • 28
  • 62
  • 86
423
votes
12 answers

How can I change the thickness of my
tag

I want to change the thickness of my horizontal rule (
)in CSS. I know it can be done in HTML like so -
But I hear that this is deprecated as mentioned on MDN here. In CSS I tried using height:1px but it does not change the…
Srikar Appalaraju
  • 71,928
  • 54
  • 216
  • 264
419
votes
15 answers

Is functional GUI programming possible?

I've recently caught the FP bug (trying to learn Haskell), and I've been really impressed with what I've seen so far (first-class functions, lazy evaluation, and all the other goodies). I'm no expert yet, but I've already begun to find it easier to…
shosti
  • 7,332
  • 4
  • 37
  • 42
1
2 3
99 100