小编Dog*_*oge的帖子

Android Studio:悬停时Javadoc为空

我最近从Eclipse搬到了Android Studio,我很喜欢它.但是,我想念Eclipse中的悬停功能Javadoc.

我按照这里的说明添加了功能,但是,我的悬停不包含Javadoc.如果我使用我的文档快捷方式Ctrl+ Shift+ Space它将正确显示文档,但是,我真的希望它出现在工具提示中.

下面是我看到的截图.显然,这个方法应该有一个Javadoc.

在此输入图像描述

我在所有方法/变量上都看到了这个.任何帮助表示赞赏.

android javadoc intellij-idea android-studio

159
推荐指数
4
解决办法
4万
查看次数

android studio新项目缺少文件夹

我使用最新版本的Android Studio(0.2.2)创建了一个新项目,这是一个全新的工作室安装.当我在项目资源管理器视图中时,它无法向我显示我的项目的任何文件夹.我应该看到一个根项目文件夹,其中包含.idea,gradle和module文件夹,但它们没有显示.

这是我期望看到的(取自首次启动时创建的示例项目):

在此输入图像描述

但这是我在项目创建后立即看到的内容:

在此输入图像描述

我无法弄清楚如何公开我的项目的文件夹!我不想在没有项目浏览器的情况下开发,这简直太麻烦了.我是否错误地创建了项目,或者我错过了一些不太明显的设置?

谢谢.

android android-studio

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

Android ScrollView拒绝滚动到底部

我有一个根scrollview元素,其中包含一个relativelayout,以及相对布局中的一堆表单元素.

出于某种原因,当软键盘打开时,它似乎无法一直滚动到底部,这将我的一个按钮切成两半.

以下是层次结构查看器的屏幕截图,用于演示我的意思.

在此输入图像描述

如您所见,系统知道视图继续通过键盘,但滚动视图(正确填充屏幕的可见部分)将不会继续向下滚动.

我有android:windowSoftInputMode="adjustResize"活动的清单,我可以/不会把它切换到平底锅.

任何帮助表示赞赏.

编辑:我在多个视图中看到这个.这是另一个具有相同问题的视图的xml:

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/background" >
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="32dp" >
        <EditText
            android:id="@+id/reset_oldpass"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentRight="true"
            android:ems="10"
            android:singleLine="true"
            android:hint="@string/current_password"
            android:layout_marginTop="16dp" />
        <EditText
            android:id="@+id/reset_pass1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentRight="true"
            android:layout_below="@+id/reset_oldpass"
            android:ems="10"
            android:hint="@string/reset_new_pass"
            android:inputType="textPassword"
            android:layout_marginTop="16dp" />
        <EditText
            android:id="@+id/reset_pass2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentRight="true"
            android:layout_below="@+id/reset_pass1"
            android:ems="10"
            android:hint="@string/reset_confirm_pass"
            android:inputType="textPassword"
            android:layout_marginTop="16dp" />
        <TextView
            android:id="@+id/reset_forgot_password"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentRight="true"
            android:layout_below="@+id/reset_pass2"
            android:layout_marginTop="16dp"
            android:textColor="@color/Link"
            android:textStyle="bold"
            android:text="@string/Login_forgot_password" />
        <Button
            android:id="@+id/reset_reset_password_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/reset_forgot_password"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="16dp"
            android:layout_marginBottom="32dp"
            android:text="@string/reset_change_pass" /> …
Run Code Online (Sandbox Code Playgroud)

android scroll scrollview android-layout

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

使用Google地图绘制DrawerLayout

我将Google的DrawerLayout置于带有地图片段的活动中时遇到问题.我没有尝试使用MapView,但我担心问题会保持不变.

我在支持库(v13)中使用谷歌的DrawerLayout,并在其中放置一个地图.

通过图像可以更好地解释我遇到的问题......在2.2-2.3(4.0+以上)上,如果在绘制谷歌地图片段的任何地方,抽屉都不会出现.视图的其余部分以及视图上的小部件都会正确显示阴影,但不会显示地图.

这是我的xml布局

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
        xmlns:map="http://schemas.android.com/apk/res-auto"
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical"
            android:weightSum="4">
        <fragment
                android:id="@+id/map"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="3"
                android:name="com.google.android.gms.maps.SupportMapFragment"
                android:scrollingCache="false"
                map:cameraTargetLat="39.828325"
                map:cameraTargetLng="-98.579728"
                map:cameraZoom="2"
                map:cameraTilt="0"
                map:cameraBearing="0"/>
        <LinearLayout
                android:id="@+id/map_fragmentHolder"
                android:layout_height="0dp"
                android:layout_width="match_parent"
                android:orientation="vertical"
                android:layout_weight="1" />
    </LinearLayout>
    <include
        layout="@layout/menu_layout"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:layout_gravity="start" />

</android.support.v4.widget.DrawerLayout>
Run Code Online (Sandbox Code Playgroud)

这是在2.x设备上看到的,屏幕截图是在Android调试监视器中拍摄的,方块应该是我的DrawerLayout按钮之一

Android 2.x

它应该是这样的:

Android 4.x

我担心这是由于Gmaps对象是在FrameLayout上绘制的,但我真的不知道.

有人遇到过这个问题或有关于如何解决的想法?谢谢.

android android-layout

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