I am not new to coding in android studio, however, I have a bad time changing my dynamically added button's size from the code itself but I ran into some issues
here is the way I am trying to change the size:
btn.setLayoutParams (new TableRow.LayoutParams(pxWidth, pxHeight));
And it works, The problem is when I try to change the size for a second button, And it just changes all the previous button's sizes to the last one.
Related
Here's a snapshot of my app where you can see the running app which has missing text and you can see the text that should be displaying (which is properly displaying in design mode).
Why isn't the text displaying at runtime?
This only started happening when I updated to version 4.1 of Android Studio and rebuilt my app.
Additionally, here is how they are defined in the layout xml:
Here's a view of the layout details of the one checkbox that is not displaying the text:
Notice that it is showing text size in PT (points).
I changed it to sp after choosing from droplist and now it displays properly.
Not sure why this has always worked in the past and suddenly stopped working.
If it is a change I would expect an auto-update functionality when Android Studio upgrades the project.
Should Not Work In Design Mode Either
If it is a problem I would also expect it to display improperly in the Design Mode also. Instead it looks correct in design mode even though runtime doesn't display it. In this way I would've understood that I was using an incorrect unit.
TextView Also
I found that this was also happening in many of my TextView controls.
I'm working with flutter in Android Studio in windows.
I set the screen size 768*1024(ipad mini size) when I create my virtual devices in android studio, but I find the height is smaller than expected. Actually when I call function window.physicalSize it shows that the size is 768*796.
I have gotten the fact that the function only shows the size of the screen that flutter can render.(So the hidden part is about what? bottom navigation bar,including three buttons, back, home, and the other one, or something else, I'm not sure.)
So, the question is how can I get exact size screen I want(768*1024)?
I just created a layout using drag and drop it was not so correct, so later i erased the code and wrote all the layout code using XML code in relative layout, but even now it's displaying the previous layout which was created using drag and drop but preview works fine but app layout is displaying previous layout.
Tried clean project,rebuild etc..
Problem was when i pressed a fix tip(for an error) it created the same layout file activity_main.xml (v-24) and both were having same name
When adding a new feature to a shape file in QGIS 3.4.4. the attributes dialog opens only as a tiny window regardless of the length or number of the attribute columns in the list. I can manually adjust the size of the window but when I add the next features it is tiny again. That soon gets very annoying when many features need to be added.
Here an example screenshot:
Is this a bug or can I somewhere change the settings so that the window automatically opens at an appropriate size? I am running QGIS 3 on MacOs High Sierra 10.13.6.
This is a pretty old post but I was having the same issue so I figured I would post how I fixed it. It might have been patched in later releases because I saw there was a bug report submitted.
I'm Running QGIS 3.8 on mac.
open layer properties, navigate to attributes form (icon below source fields). On the top left drop down menu change "Autogenerate" to "drag and drop designer"
This resolved my problem and the attributes form is full size. I had to repeat the process for all shapefiles I was working on.
default settings
settings to make it work
I am using the home button of the main Activity of my IM app to allow the user to change their availability status. My app is using ActionBarSherlock, which falls back to the native implementation where supported.
However, the size of the tappable area is inconsistent between Android releases:
On Android 4.2.0 and before (including the compatibility library), only the icon is tappable:
On Android 4.2.1+, icon and activity name are tappable:
How can I make the tappable area consistently include icon and activity title on all versions of Android?
I am using ActionBarCompat (and you should probably update, if you haven't already), so this may not behave exactly the same. I wanted the full title to be clickable for using the navigation drawer. For some reason, using a custom logo instead of the text makes the whole thing automatically clickable, where only the icon could be clicked before:
final ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayShowTitleEnabled(false);
actionBar.setDisplayUseLogoEnabled(true);
actionBar.setLogo(R.drawable.im_title);
I don't know if it's possible to trigger that change while still using text with the default icon, but the setDisplay... methods and flags may be a good place to start looking.