Flutter: Giving equal width to two buttons in a ButtonBar with dynamic height for long text

Flutter: Giving equal width to two buttons in a ButtonBar with dynamic height for long text

Content Index :

Flutter: Giving equal width to two buttons in a ButtonBar with dynamic height for long text
Tag : android , By : Harry Truman
Date : November 26 2020, 06:18 AM

around this issue Try using Row instead of Button Bar and add buttons to Expanded parent
Widget myLayoutWidget() {
  return Container(
    child: Row(

      children: <Widget>[
          child: RaisedButton(
            onPressed: () {},
            child: Text("Very long text button",),
          child: RaisedButton(
            child: Text("Very very very very long text button"),
            color: Colors.red,
            onPressed: () {},

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Vertical ButtonBar buttons width

Tag : apache-flex , By : fukas78
Date : March 29 2020, 07:55 AM
this one helps. I had that problem too so I dropped s:VerticalLayout and used s:TileLayout with a fixed column width and it worked
<s:ButtonBar width="142" dataProvider="{almacen}" left="10" top="10">
      <s:TileLayout columnWidth="142"/>

iOS Constraints on Grid of Equal Width/Height Buttons cause positioning and size to vary

Tag : ios , By : Tamizhvendan
Date : March 29 2020, 07:55 AM
this one helps. Ok, I figured out how to make it work with only constraints. There were just too many interconnected dependencies and the system couldn't handle it. I was selecting the entire grid of buttons and adding Equal Heights and Equal Widths constraints to all of them, which meant each button was dependent upon every other button.
Instead, I did it row by row. I selected one row:

How does one create 2 buttons next to each other that are equal in width and height?

Tag : android , By : algoRhythm99
Date : November 23 2020, 09:01 AM
will be helpful for those in need Your screen width too small for both buttons to appear correctly. Only first button displayed at the full size, the other button forced to smaller size.
If you need these buttons to cover all screen width and be equal size, then put buttons in LinearLayout, set both buttons width to "0dp" and weight to "1":



Two inline buttons within a row of equal height and width

Tag : twitter-bootstrap , By : KS9
Date : March 29 2020, 07:55 AM
like below fixes the issue How to achieve this by using Bootstrap framework? , Firstly remove the padding of the row.
table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
  padding:0px !important;

  height:100%;  //height of button=height of td
  width:40px;   /manually assign the width same as td


How to set equal height and width based on dynamic text using CSS only

Tag : css , By : user161314
Date : March 29 2020, 07:55 AM
wish of those help You can place a single paragraph element inside a div and give the p a margin using calc() which takes into account the width of the div (because % is always based on the width of the parent element).
Working Example:
div {
display: inline-block;
color: rgb(255, 255, 255);
background-color: rgb(255, 0, 0);
padding: 6px;

p {
margin: calc(50% - 12px) 0; /* half the width minus half the line-height */
font-size: 18px;
line-height: 24px;
<p contenteditable="true">Click me &amp; edit to change div size.</p>
Related Posts Related QUESTIONS :
  • Check the memory usage anp cpu and power of an application in android
  • What is the String 'volumeName' argument of MediaStore.Audio.Playlists.Members.getContentUri referring to?
  • Playing Multiple sounds at the same time in Android
  • Android: how to change the time in emulator?
  • close the soft key pad when i click on other views in android
  • Setting the position within a spinner
  • How to play ringtone/alarm sound in Android
  • How to adjust text font size to fit textview
  • "Android 2.x" vs "Google APIs" for Android AVD Setup
  • How to center buttons on screen horizontally and vertically plus equidistant apart?
  • Discrete seekbar in Android app?
  • Gradle Build Fails - Illegal exception table range in class file com/google/wireless/android/sdk/stats/GradleBuildMemory
  • register has type Long (High Half) but expected Long (Low Half)
  • Is it good idea to use Dispatcher.Main with delay( )?
  • WebView and Advanced View is Not loading partiucalr URL
  • How to show three dots at the end of text view
  • Is it possible to run macros within Android Studio project?
  • Adding a button with default appearance but changed background color
  • What is best way to show notification at a certain time in Android?
  • Jetifier not working when library uses android component and app uses androidx component
  • How can I write the contents of an image in a filesystem
  • Retrieve a list of images from the Database and display them using a ListView?
  • java.lang.SecurityException: my location requires permission ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION
  • Timer/hourglass wont stop
  • How can I make AndroidX the default library for new Android projects?
  • Is it okay to delete buildToolsVersion android studio because of a warning in the Asyncstorage library?
  • Can I call a class that doesn't have an activity withIntent?
  • Android TextView fontFamily not working when set via TextAppearance
  • Unable to find nearby places
  • Is there any way to launch my application right away without 'Ok Google"?
  • Places api set location biased based on current location
  • Layout Preview is not displaying layout when Material Design is added
  • How do I resolve this diamond problem in Kotlin?
  • How to update the custom value in a view model object
  • How to stop refreshing/re-creating activity when updating Firebase data using setValue?
  • Manifest Permissions vs App Setttings Permissions
  • NumberFormatException in Try-Catch while converting String to Int
  • How to pass observable fields through include tag?
  • Next button on Android keyboard not submitting form
  • Does Firestore support automatic functions for updates?
  • Why app crashing because of a missing dimension (for google maps) only when I apply changes?
  • How to make a grouping, ordering and sorting: Kotlin collection
  • how to use augmented reality to change the color of a qr code once it is detected using with arcore and ml kit firebase
  • how to resolve Firebase projects adding quota problem?
  • Why it Kotlin giving me the wrong Int value when converting from a String
  • How to add bottom navigation listeners to fragments
  • Why is scrollview hiding buttons behind other views?
  • Open Settings using Linking.sendIntent()
  • How do I access an unknown node in firebase while retrieving data?
  • Can't retrieve list of all users from firebase authetication
  • many activities with same content (adview, reward adview, functions...) how to avoid repeating code?
  • Popup doesn't hide when touch outside
  • proper way to handling images in Android? by using Firebase
  • Android: Button is faded gray when it should be transparent
  • Gradle DSL method not found: 'deleteAllActions()'
  • In Clean Architecture, must Repository is Android or Kotlin module?
  • Kotlin parse double from string
  • Inconsistency detected. Invalid view holder adapter positionViewHolder
  • In App Update API always returns 1 (UPDATE_NOT_AVAILABLE)
  • Event of ImageView when click
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com