扩大ImageButtons时的图像偏移

时间:2019-07-11 12:04:34

标签: android xml android-layout android-linearlayout layout-inflater

我的应用程序中有一个活动,必须在其中充气ImageButtons。我以为一开始效果不错,但注意到整个视图都移了下来。我做错了吗?

我试图更改XML模板的某些功能,但无法解决问题或无法解决问题。

class .... extends State<..> {
    Future<List<TransactionsModel>> transactionsFuture;

    void initState() {
        transactionsFuture = fetchTransactions(http.Client());
    }

    Widget build(BuildContext context){
        ...
        FutureBuilder<List<TransactionsModel>>(
            future: transactionsFuture,
            builder: (context, snapshot) {
        ...
    }
}

1 个答案:

答案 0 :(得分:0)

问题似乎出在LinearLayout“ linear”的XML属性“ layout_gravity”上。只需将其删除即可解决此问题。