小编Jos*_* CC的帖子

在scrollView里面的谷歌地图片段

所以我一直试图在fragment里面使用谷歌地图精简版scrollView,我无法显示地图.scrollView通过它自己移除并离开片段后,现在是时候可以看到地图了.我只是想了解为什么会这样,以及是否有可能让我的scrollView结束时显示这个片段.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:map="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.joe.goout.EventDetails">

<ImageView
    android:src="@mipmap/park1"
    android:layout_width="fill_parent"
    android:layout_height="150dp"
    android:scaleType="centerCrop"
    android:adjustViewBounds="true"
    android:id="@+id/imageView"
    android:layout_alignParentRight="true"
    android:layout_alignParentEnd="true" />

<ScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_below="@+id/imageView"
    android:id="@+id/scrollView"
    android:fillViewport="false">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Medium Text"
        android:id="@+id/textView"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />

  </ScrollView>
</RelativeLayout> 
Run Code Online (Sandbox Code Playgroud)

android

8
推荐指数
2
解决办法
1518
查看次数

如何从ACE-Angular编辑器中获取值

我在代码编辑器上输入的任何内容都无法获得Ace代码编辑器结果.

如您所见,我设置了具有所有功能和选项的控制器.唯一不起作用的是从编辑器渲染结果.先感谢您....

app.controller('AceCtrl', function ($scope) {

      $scope.modes = ['CoffeeScript'];
      $scope.mode = $scope.modes[0];

      $scope.aceOption = {
        mode: $scope.mode.toLowerCase(),
        onLoad: function (editor) { 
          // defaults 
          editor.setTheme("ace/theme/monokai");
           // options
           editor.setOptions({
            showGutter: true,
            showPrintMargin: false,
           });

          $scope.modeChanged = function () {
            editor.getSession().setMode("ace/mode/" + $scope.mode.toLowerCase());
          };

        }
      };

      //Runs every time the value of the editor is changed
        $scope.aceChanged = function(_editor){
          console.log('Ace editor changed');
          // Get Current Value
          var currentValue = _editor.getSession().getValue();
          // Set value
          _editor.getSession().setValue('This text is now in the editor');
        };
});


<div …
Run Code Online (Sandbox Code Playgroud)

angularjs

7
推荐指数
1
解决办法
6337
查看次数

标签 统计

android ×1

angularjs ×1