Ich habe gerade eine ListView in einem Linearlayout implementiert, aber ich muss die Höhe des Linearlayouts definieren (es muss 50% der Bildschirmhöhe sein). < /p>
< /code>
Ist das möglich? an Layouts zu arbeiten. < /p>
Dies ist mein Code: < /p>
//capture the size of the devices screen
Display display = getWindowManager().getDefaultDisplay();
double width = display.getWidth();
//my EditText will be smaller than full screen (80%)
double doubleSize = (width/5)*4;
int editTextSize = (int) doubleSize;
//define the EditText
userName = (EditText) this.findViewById(R.id.userName);
password = (EditText) this.findViewById(R.id.password);
//set the size
userName.setWidth(editTextSize);
password.setWidth(editTextSize);
Ich habe gerade eine ListView in einem Linearlayout implementiert, aber ich muss die Höhe des Linearlayouts definieren (es muss 50% der Bildschirmhöhe sein). < /p>
[code]
< /code>
Ist das möglich? an Layouts zu arbeiten. < /p>
Dies ist mein Code: < /p>
//capture the size of the devices screen Display display = getWindowManager().getDefaultDisplay(); double width = display.getWidth();
//my EditText will be smaller than full screen (80%) double doubleSize = (width/5)*4; int editTextSize = (int) doubleSize;
Was passiert, wenn ich „line-height:1“ hinzufüge?
Ergibt sich daraus die Inhaltshöhe im Box-Modell für jedes Element mit Textinhalt darin?
Ist das so? die Inhaltshöhe im Box-Modell für jedes Element...
import React from 'react'
import TextField from '@material-ui/core/TextField'
import style from './style'
import withStyles from 'hoc/withStyles'
import { connect } from 'react-redux'...
Ich erstelle eine Web -Benutzeroberfläche, in der ich einen großen Bereich mit Hauptinformationen und drei Seitenleistenbereichen habe. Zwei der Seitenleisten sind schmal und einer ist breiter. Auf...