小编Mov*_*aev的帖子

ExpandableListView的项目混合在一起

所以我已经将这个应用程序用于梦想分析,它在手机上运行得非常好,但在平板电脑上,探索中的信息可以融合,如下图所示.

也就是说,当你点击它应该隐藏/显示它的子组时,但正如你所看到的,在平板电脑上它只是继续一个接一个地绘制信息,就像显示器不会刷新其内容,我不知道是什么要做,所以请你帮忙.

设备2016-10-26-094550.png

容器布局:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:paddingBottom="10dp">


    <ExpandableListView
        android:id="@+id/sExpList"
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:groupIndicator="@null" />

    <!-- FOR PORTRAIT LAYOUTS !-->
    <FrameLayout
        android:id="@+id/adLayout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|center_horizontal"
        android:layout_marginTop="5dp"
        android:baselineAligned="false"
        android:orientation="vertical"/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

组元素代码:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    >

    <TextView
        android:id="@+id/textGroup"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginLeft="5dp"
        android:layout_marginTop="20dp"
        android:layout_weight="1"
        android:textStyle="bold"
        android:textSize="@dimen/text_normal_size" />

    <ImageButton

        android:id="@+id/sExp_BtnAdd"
        android:layout_width="@dimen/btns_heigh"
        android:layout_height="@dimen/btns_heigh"
        android:layout_gravity="center_vertical"
        android:contentDescription=""
        android:focusable="false"
        android:scaleType="centerCrop"
        android:src="?attr/img_add" />

</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

子元素代码:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="fill_parent"
              android:layout_height="match_parent">

    <TextView
            android:id="@+id/textChild"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="20dp"
            android:layout_marginTop="20dp"
            android:textColor="@android:color/white"
            android:layout_weight="1" …
Run Code Online (Sandbox Code Playgroud)

android expandablelistview

6
推荐指数
1
解决办法
198
查看次数

从内部解雇$ uibModal

我正在使用Bootstrap的$ uibModal在我的web应用程序中制作表单.一切正常,除了在显示对话后我无法关闭对话框.

我花了两天时间试图不在这里发布这么简单的问题,特别是当我收到的同样错误的答案很多时,即

" 未知提供者:$ uibModalInstanceProvider < - $ uibModalInstance < - ModalInstanceCtrl ".

为了使用大量应用程序轻松操作,我将代码分成单独的文件,我在htmls中使用'controller as'样式,因此,代码中没有$ scope.

无论我做什么,我都会收到我之前提到的这个错误.我需要的是在用户成功登录后关闭对话框.

index.html的:

...
    <script src="rf/angular.min.js"></script>
    <script src="rf/angular-animate.js"></script>
    <script src="rf/angular-touch.js"></script>
    <script src="rf/ui-bootstrap-tpls.js"></script>

    <!-- Project files -->
    <script src="application.js" type="text/javascript"></script> 
    <script src="frmLogin.js"></script>
</head>
<body>
    <!-- Load things into this division -->
    <div ng-include src="loaderCtrl.cFragment" ng-app="dgis" ng-controller="applicationController as loaderCtrl"></div>
</body>
Run Code Online (Sandbox Code Playgroud)

的application.js

var myApp = angular
  .module('dgis', ['ui.bootstrap'])
  .controller("applicationController", ['$http', '_gl', '$uibModal', function ($http, _gl, $uibModal) {
      _gl.AppReference = this;

      // Enable animations
      this.animationsEnabled = true;

      // …
Run Code Online (Sandbox Code Playgroud)

angularjs angular-ui-bootstrap

3
推荐指数
1
解决办法
1万
查看次数