小编Fab*_*ian的帖子

按钮中的Android进度条

是否有可能在按钮中显示旋转进度条?例如作为背景可绘制?

android button progress-bar

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

Listview分频器保证金

我正试图为listview分频器设置一个余量.
分隔线是虚线:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="line" >
    <stroke
        android:dashGap="1dp"
        android:dashWidth="1.5dp"
        android:width="1dp"
        android:color="#FF404040" />

    <size android:height="3dp" />

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

以及listview我设置分隔符的位置

<ListView
    android:id="@+id/lv_news_feed_list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/white"
    android:divider="@drawable/ch_dashed_line_divider"
    />
Run Code Online (Sandbox Code Playgroud)

但是我想要左右分隔边距.我也尝试在形状上设置填充,但listview忽略了填充.

    <padding
        android:bottom="15dp"
        android:left="15dp"
        android:right="15dp"
        android:top="15dp" />
Run Code Online (Sandbox Code Playgroud)

是否有可能为listview分频器设置余量- 除了适配器的getView()?

android divider android-listview

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

Gmail平板电脑,如Actionbar项目

我正在尝试使用actionbar/toolbarGmail应用中的拆分构建应用.

是否存在此行为的任何视图元素,或者我是否必须自己编写这样的工具栏?

fragment打开时,搜索图标随主人一起移动slidingDrawer.

封闭抽屉

打开抽屉

android menuitem android-actionbar android-toolbar

12
推荐指数
1
解决办法
919
查看次数

Android(列表)视图过度滚动,如Sense UI

我在谷歌和stackoverflow上搜索了一段时间,但我找不到解决方案.是否有任何可能性让Android 2.2或2.1上的listview过度滚动就像感觉ui那样?!就像在我的报警视图中一样:AlarmView Sense UI

android listview android-overscoll

5
推荐指数
2
解决办法
6140
查看次数

在充气后,findViewById在自定义视图中返回null

我有一个自定义RelativeLayout,我在其中膨胀一个xml res文件.这工作得很好,如果我在一个XML文件中使用自定义布局,并将其设置为内容查看,但如果我尝试将其与添加的代码new LocationItem(this)addChild()findViewById方法始终返回null自定义的构造函数RelativeLayout.

这是代码:

public class LocationItem extends RelativeLayout {

private String parcelType;
private int countIntoBox, countFromBox;

private RelativeLayout deliveryContainer, pickupContainer;

private TextView countPickup, countDelivery;

public LocationItem(Context context) {
    this(context, null);
}

public LocationItem(Context context, AttributeSet attrs) {
    this(context, attrs, 0);
}

public LocationItem(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    inflate(getContext(), R.layout.list_item_location, this);
    deliveryContainer = (RelativeLayout) findViewById(R.id.rl_location_delivery_container);
    pickupContainer = (RelativeLayout) findViewById(R.id.rl_location_pickup_container);
    countPickup = (TextView) findViewById(R.id.tv_location_pickup_count); …
Run Code Online (Sandbox Code Playgroud)

android nullpointerexception android-custom-view android-layout layout-inflater

5
推荐指数
1
解决办法
4890
查看次数

使用 apache maven wagon ssh 上传到私人 maven repo | 未知主机

我正在尝试将我的库上传到我们公司内的私有 Maven 存储库。我可以从我的 mac/linux 终端通过 ssh 访问服务器/repo,但我无法配置 wagen-ssh (2.2) 将其上传到 repo。

我按照此处的描述编写了 gradle 任务:https ://docs.gradle.org/current/userguide/maven_plugin.html

configurations {
    deployerJars
}
dependencies {
    ...
    deployerJars  'org.apache.maven.wagon:wagon-ssh:2.2+'
}

uploadArchives {
    repositories {
        mavenDeployer {
            configuration = configurations.deployerJars
            repository(url: "scp://{server}/var/www/maven") {
                authentication(userName: "myUsername", password: "myPassword")
            }
            pom.version = '0.1.0'
            pom.groupId = 'com.mycompany'
            pom.artifactId = 'mylib'

        }
    }
}
Run Code Online (Sandbox Code Playgroud)

但每次我尝试执行 gradle 任务时,我都会收到错误消息:无法部署工件:无法将工件 com.mycompany:mylib:aar:0.1.0 from/to remote (scp://{server}/var/www /maven): 主机未知且未被配置接受:{server}

我认为 wagon 正在使用自己的内部 ssh 客户端。我怎么能告诉这个客户接受我的主人,或者接受任何主人?!还是我错了,还有另一个问题?

ssh android maven build.gradle android-gradle-plugin

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