我Activity在Android中有两个元素:
EditText ListView当我Activity开始时,EditText立即有输入焦点(闪烁光标).我不希望任何控件在启动时具有输入焦点.我试过了:
EditText.setSelected(false);
EditText.setFocusable(false);
Run Code Online (Sandbox Code Playgroud)
没运气.如何说服开始EditText时不选择自己Activity?
我使用a ListView来显示与这些图像相关的一些图像和标题.我从互联网上获取图像.有没有办法延迟加载图像,以便文本显示时,UI不会被锁定,图像会在下载时显示?
图像总数不固定.
我创建了一个特定的List,它存在于以下元素之外,用于创建一个可滚动的列表,每行包含左侧的Image和右侧的一些文本:
首先是"根"布局:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#C8C8C8"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false"
android:divider="#C8C8C8"
android:background="#C8C8C8"/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
然后在ListView中我放置以下"行"项:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/bg_row"
>
<ImageView
android:layout_width="wrap_content"
android:paddingLeft="10px"
android:paddingRight="15px"
android:paddingTop="5px"
android:paddingBottom="5px"
android:layout_height="wrap_content"
android:src="@drawable/bg_image"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5px"
android:paddingBottom="5px"
android:textSize="16sp"
android:textColor="#000000"
android:layout_gravity="center"
android:maxHeight="50px"/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
只要屏幕静态显示(没有移动)就会正确显示,但是当我开始滚动列表时,行项目的背景(代码中显示的"图标")将是正确显示,但"根"布局的背景将变成完全黑色...当滚动停止时,背景将会,大多数时候,恢复它的颜色...当我测试时我也在TextView该根元素中添加了一个具有相同的背景,当滚动列表时,这个将保留它的颜色...任何想法为什么会发生这种情况,以及如何解决这个问题?
在Twitter(官方应用程序)等Android应用程序中,当您遇到ListView时,可以将其拉下(并在发布时它会反弹)以刷新内容.
我想知道在您看来,实施该方法的最佳方式是什么?
我能想到的一些可能性:
有什么建议?
PS我想知道官方Twitter应用程序源代码何时发布.有人提到它会被释放,但已经过去了6个月,从那时起我们就没有听说过.
我正在使用两个ListView这样的:
<ListView
android:id="@+id/ListView"
android:text="@string/Website"
android:layout_height="30px"
android:layout_width="150px"
android:scrollbars="none"
android:transcriptMode="normal"/>
<ListView
android:id="@+id/ListView1"
android:text="@string/Website"
android:layout_height="30px"
android:layout_width="150px"
android:scrollbars="none"
android:transcriptMode="normal"/>
Run Code Online (Sandbox Code Playgroud)
两者之间有一条空白行ListView.我该如何删除它?
当修改项目时,我创建了一个JS类来填充SG/Folder列表视图数据.(根据Jaime的方法) 当我在他们创建的出版物中操作项目时,一切都很有效.
例如:我打开一个组件或页面,自定义locked by列会立即更新并显示我的用户名.
但是,当我转到子出版物并重复该过程时,我会看到窗口询问是否要本地化或编辑父项.如果我选择编辑父窗口,则代码不起作用.通过初始调试,我还没有完全理解它.Chrome似乎吞下了这个错误,Firefox给了我一个神秘的含义:
时间戳:2012年6月22日下午3:42:54
错误:未捕获的异常:[Exception ..."组件返回失败代码:0x80004002(NS_NOINTERFACE)[nsIWebProgress.DOMWindow]"nsresult:"0x80004002(NS_NOINTERFACE)"location:"JS frame :: chrome:// browser/content/tabbrowser .xml :: :: line 545"数据:否]
有没有人有任何初步想法?我稍后会尝试发布一些代码......
来自PageEx.js的代码:
Type.registerNamespace("MyCompany.Tridion.RTFExtensions");
/*
* Constructor
*/
MyCompany.Tridion.RTFExtensions.PageEx = function (id) {
Type.enableInterface(this, "MyCompany.Tridion.RTFExtensions.PageEx");
this.addInterface("Tridion.ContentManager.Page", [id]);
var p = this.properties;
p.versionNumberString = undefined;
p.modifiedBy = undefined;
p.lockedBy = undefined;
p.approvalStatus = undefined;
p.publishDate = undefined;
p.previousVersion = undefined;
p.previousApprovalStatus = undefined;
p.customModifiedDate = undefined;
p.initialModifierUserName = undefined;
};
/*
* sends the list xml string for the item
*/ …Run Code Online (Sandbox Code Playgroud) 我试图确定一个包含每行不同布局的单个ListView的最佳方法.我知道如何创建自定义行+自定义数组适配器以支持整个列表视图的自定义行,但是如何在ListView中实现许多不同的行样式?
谁能解释或建议在android中创建listView的教程?
这是我的要求:
我知道有很多关于这个主题的问题,在StackOverflow上发布,但找不到任何能回答我问题的问题.谢谢!
我想换ListView到RecyclerView.我想使用onScroll的的OnScrollListener在RecyclerView确定用户滚动到列表的末尾.
如何知道用户是否滚动到列表末尾以便我可以从REST服务获取新数据?
android listview onscrolllistener material-design android-recyclerview
我正在考虑使用ListBox或ListView作为WPF应用程序.似乎要么支持数据绑定和项目模板.我的应用程序有一个简单的项目列表,我打算能够根据用户输入搜索/排序/过滤.数据绑定演示(http://msdn.microsoft.com/en-us/library/ms771319.aspx)使用带有CollectionViewSource的ListBox.
有没有人有哪些控制权可以使用以及何时使用?
listview ×10
android ×8
attributes ×1
data-binding ×1
dynamic ×1
focus ×1
image ×1
javascript ×1
listbox ×1
listviewitem ×1
methods ×1
tridion ×1
url ×1
wpf ×1