小编Ash*_*ahu的帖子

Java XMLRPC中的Python元组

我试图通过java xmlrpc传递python元组.这是我正在使用的库: XMLPRC Java Libray

我在服务器和api上使用odoo框架.我想传递看起来像的参数:

[(4,7),(4,8)]

我能够通过以下结构:

[[4,7],[4,8]]

这显然是数组内部的数组:

new Object[]{new Object[]{4,7},new Object[]{4,8}}
Run Code Online (Sandbox Code Playgroud)

问题是java中没有元组.我吸收的是如何改变这种结构:

这个[4,8]到这个(4,8)

它是某种序列化问题,不知道如何解决它并传递预期的python结构.

python java xml-rpc openerp

17
推荐指数
1
解决办法
531
查看次数

如何实现Gmail像捏缩放和标题滚动

如何实现类似Gmail应用程序的捏缩放行为?我已将标头容器放在ScrollView中,然后是WebView。似乎这是非常复杂的行为。

这里没有变焦。

在此处输入图片说明

当我们捏Webview时,上部容器按照缩放比例向上滚动:

在此处输入图片说明

到目前为止,这是我的姓名缩写:

  <?xml version="1.0" encoding="utf-8"?>
  <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@color/white">

    <RelativeLayout
       android:layout_width="match_parent"
       android:layout_height="match_parent"
       android:background="@color/white"
       android:fitsSystemWindows="true">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/white">

        </android.support.v7.widget.Toolbar>
    </android.support.design.widget.AppBarLayout>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/appbar">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="200dp"
                android:background="@color/colorPrimary"></FrameLayout>

            <WebView
                android:id="@+id/webView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/white"
                android:scrollbars="none" />
        </LinearLayout>
    </ScrollView>
  </RelativeLayout>
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)

android webview pinchzoom

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

标签 统计

android ×1

java ×1

openerp ×1

pinchzoom ×1

python ×1

webview ×1

xml-rpc ×1