小编san*_*tap的帖子

如何在地图片段API v2布局顶部添加按钮

我正在尝试使用API​​ v2在android中显示地图.
我想要UI这样的东西.但是每当我尝试在布局中添加按钮时它不会反映在输出中
我能够获得没有按钮的地图.
我需要按钮与地图集成,如下面
的Mylayout.xml代码:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MapActivity" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="48dp">
<LinearLayout 
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioGroup 
android:id="@+id/radio_group_list_selector"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal|center_vertical"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:layout_weight="1"

>
<RadioButton
android:id="@+id/radioPopular"
android:layout_width="0dp"
android:layout_height="match_parent"
android:gravity="center_horizontal|center_vertical"
android:text="@string/Popular"
android:layout_weight="1"
android:button="@null"
android:background="@drawable/shape_radiobutton"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:layout_marginLeft="4dp"
android:textColor="@drawable/textcolor_radiobutton"

/>
<View
android:id="@+id/VerticalLine"
android:layout_width="1dip"
android:layout_height="wrap_content"
android:layout_marginBottom="4dip"
android:layout_marginTop="4dip"
android:background="#aaa"
            />
<RadioButton
android:id="@+id/radioAZ"
android:layout_width="0dp"
android:layout_height="match_parent"
android:gravity="center_horizontal|center_vertical"
android:text="@string/AZ"
android:layout_weight="1"
android:button="@null"
android:background="@drawable/shape_radiobutton2"
android:layout_marginBottom="4dp"
android:layout_marginTop="4dp"
android:textColor="@drawable/textcolor_radiobutton"

/>
 <View
android:id="@+id/VerticalLine"
android:layout_width="1dip"
android:layout_height="wrap_content"
android:layout_marginBottom="4dip"
android:layout_marginTop="4dip"
android:background="#aaa"
            />
<RadioButton
android:id="@+id/radioCategory"
android:layout_width="0dp"
android:layout_height="match_parent"
android:gravity="center_horizontal|center_vertical"
android:text="@string/Category" …
Run Code Online (Sandbox Code Playgroud)

android google-maps android-layout android-button

64
推荐指数
2
解决办法
10万
查看次数

java.lang.IllegalArgumentException:在发出https请求时索引7处的权限中的非法字符

在从android模拟器向我的本地wamp服务器发出http请求时,我得到了上述错误.

// testing on Emulator:
private static final String LOGIN_URL="http:// 10.0.2.2:80/webservice/login.php";

//request:
JSONObject json = jsonParser.makeHttpRequest(LOGIN_URL, "POST", params);
Run Code Online (Sandbox Code Playgroud)

java android wampserver android-emulator

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

获取 chrome.topSites 和最近关闭的标签

我正在开发 chrome 扩展,它将替换新的选项卡 UI 我能够检索已安装的应用程序信息。但是我无法检索访问量最大和最近的 cloed 标签信息..

我的 manifest.json

{
 "name": "Cloud Tab",
"version": "1.0",
"description": "New Tab with cloud UI.",
"background_page": "background.html",
"permissions": [ "tabs","management","topSites",
    "chrome://favicon/"],

"chrome_url_overrides": {
"newtab": "CloudTab.html"
}
}
Run Code Online (Sandbox Code Playgroud)

我的 CloudTab.html 页面的脚本标签包含

 chrome.topSites.get(function(info){
   for(var i=0;i<info.length;i++) {alert(info[i].url);}
  });
Run Code Online (Sandbox Code Playgroud)

但我收到错误 > Uncaught TypeError: Cannot call method 'get' of undefined 我已经为此参考了 google 的 api 但没有运气我运行 chrome 的版本 13.0.782 有什么建议吗?

api browser-history google-chrome-extension

5
推荐指数
0
解决办法
2776
查看次数

无法在桌面上调用方法?表变量

我试图将外部应用放在表变量上,但我收到如下错误

无法在表上调用方法.

我有Split功能,将字符串拆分为一定长度

CREATE FUNCTION Split(@String varchar(MAX), @SplitLength int) 
RETURNS @Result TABLE (Splited varchar(MAX))
AS
BEGIN

Declare @Cnt int
    Set @Cnt = FLOOR((len(@String)/@SplitLength));

   While @Cnt!=0
    Begin
     SET @Cnt=@Cnt-1;
        While len(@String)>@SplitLength 
        Begin

         INSERT INTO @Result  VALUES (SUBSTRING(@String,1,@SplitLength))

         SET @String=SUBSTRING(@String,@SplitLength+1,len(@String)-@SplitLength) 

        End     

    End

RETURN
END
Run Code Online (Sandbox Code Playgroud)

我与表变量连接,其中包含要分割字符串的列

    DECLARE @LeftSuper TABLE
(
KeyTerm VARCHAR(MAX),
Data VARCHAR(MAX) ,

)
Run Code Online (Sandbox Code Playgroud)

查询如下,哪个生成错误(无法调用表上的方法)

 select KeyTerm ,D.Splited from @LeftSuper
 outer apply [Split](@LeftSuper.Data,300) as D
Run Code Online (Sandbox Code Playgroud)

注意:代码适用于db中的Real Table.

sql sql-server table-variable table-valued-parameters

0
推荐指数
1
解决办法
3721
查看次数