Code Monkey home page Code Monkey logo

android-common's Issues

DropDownListView樣式問題

您好,我使用DropDownListView去實作下拉重整和載入更多,然後用下面程式碼設定樣式:

listView.setDropDownStyle(true);
listView.setOnBottomStyle(true);
listView.setAutoLoadOnBottom(true);

但是當只有很少的Item在ListView的時候就會顯示像這樣,但是正常應該是上下拉的時候才會顯示Header和Bottom View才對。
device-2015-02-11-100742

是否有解決方法呢??謝謝。

调用PackageUtils的uninstallSilent报错

错误信息:java.lang.SecurityException: Package null does not belong to 1000
求问一下,这是什么原因?静默安装是可以成功的,应用已经用系统签名,并且push到system/app目录下。

执行commands有问题

for (String command : commands) {
if (command == null) {
continue;
}

            // donnot use os.writeBytes(commmand), avoid chinese charset error
            os.write(command.getBytes());
            os.writeBytes(COMMAND_LINE_END);
            os.flush();
        }

当传入的commands数组过大,os write将近64M的字节时会出现错误

dropDownListView setOnBottomListener抛出Null指针

代码片段:
dropDownListView = (DropDownListView)findViewById(R.id.list_view);
try {
dropDownListView.setOnBottomListener(new OnClickListener() {
@OverRide
public void onClick(View v) {
new GetDataTask(false).execute();
}
});
} catch (Exception e) {
e.printStackTrace();
}
情况:已debug跟踪过dropDownListView不是null
异常信息:
03-28 20:37:11.200 15372-15372/community.o2o.com.meimo W/System.err﹕ java.lang.NullPointerException
03-28 20:37:11.220 15372-15372/community.o2o.com.meimo W/System.err﹕ at cn.trinea.android.common.view.DropDownListView.setOnBottomListener(DropDownListView.java:351)
03-28 20:37:11.220 15372-15372/community.o2o.com.meimo W/System.err﹕ at community.o2o.com.meimo.view.SearchListActivity.onCreate(SearchListActivity.java:36)
03-28 20:37:11.220 15372-15372/community.o2o.com.meimo W/System.err﹕ at android.app.Activity.performCreate(Activity.java:5453)
03-28 20:37:11.220 15372-15372/community.o2o.com.meimo W/System.err﹕ at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
03-28 20:37:11.220 15372-15372/community.o2o.com.meimo W/System.err﹕ at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2377)
03-28 20:37:11.220 15372-15372/community.o2o.com.meimo W/System.err﹕ at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471)
03-28 20:37:11.225 15372-15372/community.o2o.com.meimo W/System.err﹕ at android.app.ActivityThread.access$900(ActivityThread.java:175)
03-28 20:37:11.225 15372-15372/community.o2o.com.meimo W/System.err﹕ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
03-28 20:37:11.225 15372-15372/community.o2o.com.meimo W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:102)
03-28 20:37:11.225 15372-15372/community.o2o.com.meimo W/System.err﹕ at android.os.Looper.loop(Looper.java:146)
03-28 20:37:11.225 15372-15372/community.o2o.com.meimo W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5602)
03-28 20:37:11.225 15372-15372/community.o2o.com.meimo W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
03-28 20:37:11.225 15372-15372/community.o2o.com.meimo W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
03-28 20:37:11.230 15372-15372/community.o2o.com.meimo W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
03-28 20:37:11.230 15372-15372/community.o2o.com.meimo W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
03-28 20:37:11.230 15372-15372/community.o2o.com.meimo W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)

API design discussion

研究了一下imagecache的code。demo app的用法是:
IMAGE_SD_CACHE.get(imageUrlList.get(position), holder.imageView);

一个建议,这个接口是不是不应该关心view呢,包括callback的接口。因为在callback的时候view和url的关系可能变化,或者view已经不可见了。如果用的人把ImageSDCardCache用成singleton的了,那么是不是可能造成view的内存泄漏呢。

可能我的理解有误,供大家讨论吧

SingletonUtils.java 如何使用?

你好,SingletonUtils.java这个类我关注了好久,一直没有明白它是如何使用的,我的理解是为了单利代码的重复书写,但是具体的写法我不能明白。麻烦给讲解或者发段代码学习一下。谢谢!

java.io.SyncFailedException: fsync failed: EINVAL (Invalid argument)

参数无效?
在执行ShellUtils.execCommand()时发现在控制台会有如下提示:
W/System.err: java.io.SyncFailedException: fsync failed: EINVAL (Invalid argument)
W/System.err: at java.io.FileDescriptor.sync(FileDescriptor.java:77)
W/System.err: at java.io.FileOutputStream.flush(FileOutputStream.java:194)
W/System.err: at java.io.FilterOutputStream.flush(FilterOutputStream.java:88)
W/System.err: at java.io.DataOutputStream.flush(DataOutputStream.java:63)

老哥,还维护吗

            ShellUtils.CommandResult result = ShellUtils.execCommand("screencap", true,true);           
            System.out.println(result.successMsg);
            System.out.println(result.errorMsg);
            System.out.println(result.result);

如果这样的话就永远挂起了,没有响应,我不希望截图保存到闪存,我想直接拿到输出,但是命令返回值只有string类型的

关于系统截屏

是否打算增加系统截屏反面的功能,刚好我可以提供相应代码

DownloadManagerDemo出现问题

我下载了demo的apk,然后点击DownloadManagerDemo,过了一会提示我“美丽说 下载失败”,之后我就删除了这个apk,为何删除了还是隔一段时间提示我“美丽说 下载失败”...求指教!!!

建议各工具类分开

建议各工具类分开哦, 这样在一起有点太重量级了, 比如我只想使用图片缓存功能, 但是整个项目都要引入!

没什么卵用

差不多吧整个github都抄下来了,运行要下载一大堆东西,建议楼主发点自己写的有研究价值的东西,勿喷谢谢

关于系统截屏

是否打算增加系统截屏方面的功能,刚好我可以提供相应代码

项目运行的时候报错,包依赖都没有问题

java.lang.RuntimeException: Unable to start activity ComponentInfo{cn.trinea.android.demo/cn.trinea.android.demo.MainActivity}: android.view.InflateException: Binary XML file line #31: Error inflating class com.google.ads.AdView

Utils Should have 2 version

Hello,

great work. indeed it would be great if we have 2 versions of Utils.

  1. Separate Utils which can be used individually without dependent on another Utils.
  2. Dependent Utils [the current version]

i hope it makes clear. because sometimes a developer wants just one Utils in their project and they are ended up importing many files.

DropDownListView下拉会有闪屏现象

DropDownListView.在下拉时,header会突然整个显示出来,将listivew向下挤压,又很快地恢复到刚拉出一点的状态。这中间会有一次闪屏。另外,正常状态下,scrollbar不能达到最顶端。请确认。

红米Note2静默卸载app失败

红米Note2(已经Root)静默卸载app失败,错误日志是:uninstallSilent successMsg:, ErrorMsg:CANNOT LINK EXECUTABLE: could not load library "libc.so" needed by "/system/bin/sh"; caused by "libc.so" is 32-bit instead of 64-bit

ImageSDCardCache 缓存的使用

ImageSDCardCache initData,还有loadDataFromDb 测试了下,感觉没效果呀。
如果说缓存 有效,是不是在断网 的情况下,也应该显示图片呢。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.