如何修改android下拉通知栏的高度???
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何修改android下拉通知栏的高度???相关的知识,希望对你有一定的参考价值。
我调用了相应的布局,在布局中设置了高度,但没有效果,还是显示的默认高度
修改 android 状态栏高度:配置文件:frameworks/base/core/res/res/values/dimens.xml
修改条目:
<resources>
<!-- The width that is used when creating thumbnails of applications. -->
<dimen name="thumbnail_width">0dp</dimen>
<!-- The height that is used when creating thumbnails of applications. -->
<dimen name="thumbnail_height">0dp</dimen>
<!-- The standard size (both width and height) of an application icon that
will be displayed in the app launcher and elsewhere. -->
<dimen name="app_icon_size">48dip</dimen>
<dimen name="toast_y_offset">64dip</dimen>
<!-- Height of the status bar -->
<dimen name="status_bar_height">38dip</dimen>
<!-- Height of the status bar -->
<dimen name="status_bar_icon_size">38dip</dimen>
<!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
<dimen name="status_bar_edge_ignore">5dp</dimen>
<!-- Size of the fastscroll hint letter -->
<dimen name="fastscroll_overlay_size">104dp</dimen>
<!-- Width of the fastscroll thumb -->
<dimen name="fastscroll_thumb_width">64dp</dimen>
<!-- Height of the fastscroll thumb -->
<dimen name="fastscroll_thumb_height">52dp</dimen>
<!-- Default height of a key in the password keyboard -->
<dimen name="password_keyboard_key_height">56dip</dimen>
<!-- Default correction for the space key in the password keyboard -->
<dimen name="password_keyboard_spacebar_vertical_correction">4dip</dimen>
</resources> 参考技术A 这个不能更改的,但是可以更换不同的样式。一般一些安卓论坛里有(需要root权限)
望采纳哦 参考技术B 这个不能更改的,但是可以更换不同的样式。一般一些安卓论坛里有(需要root权限) 参考技术C 这个不能更改的,但是可以更换不同的样式。一般一些安卓论坛里有(需要root权限) 参考技术D 通知栏?你怎么改的,这是framework定义的啊 第5个回答 2016-01-02 不能改变。
如何减少抖动中下拉列表的高度
如何减少Flutter中的下拉列表高度。现在它覆盖了全屏。
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _MyAppState();
}
}
class _MyAppState extends State<MyApp> {
List<DropdownMenuItem<String>> _dropdownMenuItemsyears;
String _selectedyear;
onChangeDropdownItemyear(String selectedYear) {
setState(() {
_selectedyear = selectedYear;
});
}
List<String> getYears() {
List<String> years = new List<String>();
var date = new DateTime(1900).year;
var now = new DateTime.now().year;
int dateFrom = date;
int dateTo = now;
for (int i = dateFrom; i <= dateTo; i++) {
years.add(i.toString());
}
years.add("Select");
return years.reversed.toList();
}
List<String> _yearvalue = new List<String>();
List<DropdownMenuItem<String>> buildDropdownMenuItemsyears(List Years) {
List<DropdownMenuItem<String>> itemsyears = List();
for (String Year in Years) {
itemsyears.add(
DropdownMenuItem(
value: Year,
child: Text(
Year,
overflow: TextOverflow.ellipsis,
style: new TextStyle(
fontFamily: 'Muli',
color: Colors.black,
fontSize: 16,
decoration: TextDecoration.none),
),
),
);
}
return itemsyears;
}
@override
void initState() {
// TODO: implement initState
super.initState();
_yearvalue = getYears();
_dropdownMenuItemsyears = buildDropdownMenuItemsyears(_yearvalue);
_selectedyear = _dropdownMenuItemsyears[0].value;
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('First app')),
body: Column(children: [
Container(
child: new Container(
width: 150,
transform: Matrix4.translationValues(-6, -12, 0),
child: new Container(
child: DropdownButtonHideUnderline(
child: ButtonTheme(
alignedDropdown: true,
child: DropdownButton(
value: _selectedyear,
items: _dropdownMenuItemsyears,
//Text widgets that have more text and are larger than the hint
onChanged: onChangeDropdownItemyear,
),
),
),
),
)),
]),
),
);
}
}
答案
通过下面链接中提到的DropDownButton类中的可用属性是不可能的。
DropdownButton-class - Flutter Docs
以上是关于如何修改android下拉通知栏的高度???的主要内容,如果未能解决你的问题,请参考以下文章