Eclipse中的工作区设置存在一些奇怪的问题.我有一个Android库项目和一个链接到库的应用程序项目.
在编译时和运行时一切正常,但每当我启动应用程序时,我都会在Eclipse控制台中看到此消息:
"找不到XXX.apk!"
我怎样才能消除它?
谢谢
我正在开发一个聊天屏幕.它包括用于用户个人资料图像的CollapsingToolbarLayout,用于消息列表的RecyclerView和用于发送消息的编辑框.我无法弄清楚是否可以将编辑框固定到底部屏幕并防止它与屏幕的其余部分滚动?
如果我在一个垂直的LinearLayout中包装CoordinatorLayout并将EditText放在CoordinatorLayout之外,我几乎达到了我想要的效果.但是在这种情况下,键盘行为与RecyclerView分离 - 当您打开键盘时,它不会向上/向下滚动.
如果我尝试将EditText放在CoordinatorLayout中,它会滚出屏幕,我不知道是否需要为它设置任何特殊的行为
我的布局
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/keyboard_listener"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinator"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
>
<RecyclerView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:clipToPadding="false"
android:focusableInTouchMode="true"
android:paddingBottom="20dp"
android:scrollbarStyle="outsideOverlay"
android:scrollbars="vertical"
android:transcriptMode="normal"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
/>
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
>
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/screen_toolbar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
app:titleEnabled="false"
>
<FrameLayout
android:id="@+id/toolbar_fragment_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<Toolbar
android:id="@+id/screen_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@android:color/transparent"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_collapseMode="pin"
/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>
<EditText
android:id="@+id/messageEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:hint="@string/send_hint"
android:inputType="textCapSentences|textMultiLine"
android:maxLength="2000"
android:maxLines="4"
android:padding="10dp"
android:textSize="14sp"/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud) android android-layout android-coordinatorlayout android-appbarlayout
我现在面临着Ubuntu上的Eclipse问题.我的设备已连接,按"adb devices"命令列出,我可以看到设备视图中运行的进程列表.但是,模拟器控件中的所有控件都被禁用.
有谁知道这可能是什么原因?
谢谢
我有一个TextView,我用HTML填充然后链接它.HTML中的某些链接采用特殊格式,并且是指向项目中其他活动的链接,而不是普通的URL链接.是否可以在TextView中拦截此类链接上的点击并在链接采用特殊格式时执行自定义操作?
谢谢.
昨天我从Lion升级到Mountain Lion,今天我的工作效率下降了.我不能对方法或变量执行"cmd + click"来进行声明,因为eclipse中显示的弹出窗口包含一个溢出最后一个选项的水平滚动条.
有没有人有解决方法如何解决这个问题?
更新:只是要清楚 - 既不"滚动时",也不"自动基于鼠标或触控板"选项为我删除问题.只有"Always"确实有效,但它对整个系统UX的影响是不可接受的
我正在尝试找到解决以下问题的方法.我工作的应用程序要求用户通过自定义UI构建器生成自定义UI(简单小部件的布局).因此,用户可以在画布上堆叠小部件(大多数图像,但也包括TextViews和EditText),移动它们等等.必须将UI存储在数据库中以备将来使用.因此,应该有一些加载和扩充此UI的机制.这是主要问题.
我的第一个想法是依靠标准的Android布局机制.不幸的是,LayoutInflater使用编译成二进制形式的XML.据我所知,在运行时不可能将XML字符串编译成二进制表示.
有没有人有这种问题的经验?有什么建议?
我正在构建一个聊天应用程序并使用RecyclerView显示消息.由于这是一个聊天应用程序,最后的消息应该出现在列表的底部.为此,我使用LinearManager以下列方式:
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
layoutManager.setStackFromEnd(true);
layoutManager.setSmoothScrollbarEnabled(false);
Run Code Online (Sandbox Code Playgroud)
如果对话中有很多消息,它可以正常工作.但是,如果用户之间只有一条或两条消息,则RecyclerView会在屏幕底部显示这些消息,并在其上方放置空白区域.
在这种情况下,是否可以在屏幕顶部显示回收物品?
我目前正在尝试将一些遗留代码从iPhone迁移到Android.此代码使用OpenCV库进行一些图像处理.总的来说它很顺利,但是我坚持使用一行代码我不知道如何将其转换为Java代码:
Scalar dMean;
Scalar scalar;
std::vector<Mat> channels;
split(mat, channels);
for(int i=0; i<3; ++i) {
channels[i] += dMean[i];
}
Run Code Online (Sandbox Code Playgroud)
问题是 - 在Java代码中应该使用什么代替+ =运算符来将Scalar对象添加到Mat?
我目前正在尝试将一些遗留代码从iPhone迁移到Android.此代码使用OpenCV库进行一些图像处理.我无法理解如何在Mat和Android Bitmap类之间进行转换.
此代码显示了一个非常简化的示例,它将位图加载到Mat中,然后将其转换回Bitmap.生成的图像看起来很奇怪 - 它充满了蓝色和白色像素.原来是普通的PNG图像......
Mat img = Utils.loadResource(context, resId);
Bitmap tmp = Bitmap.createBitmap(img.rows(), img.cols(),
Bitmap.Config.ARGB_8888);
Utils.matToBitmap(img, tmp);
Run Code Online (Sandbox Code Playgroud) 我正在尝试在Eclipse中构建一个中型项目.它由主应用程序项目和两个Android库组成.在我为主项目添加一个非常简单的JNI库之前,一切正常.
当我在设备上运行应用程序时,我在LogCat中看到此异常:
01-11 17:19:01.421:E/AndroidRuntime(26569):at java.lang.Runtime.loadLibrary(Runtime.java:429)无法加载xxx:findLibrary返回null
我搜索了类似的问题,我相信我做的一切都是正确的:
当我创建一个测试项目并链接到相同的本机代码时 - 它工作正常.问题在主项目中仍然存在.我已经尝试从头开始创建Eclipse项目,但它没有帮助
我使用的是Android SDK Tools v.16
有人可以帮我提一个建议吗?
谢谢!
android ×10
eclipse ×3
java ×2
opencv ×2
android-ndk ×1
android-xml ×1
c++ ×1
ddms ×1
linkify ×1