The Exception
Unable to start activity ComponentInfo{com.scytec.datamobile.vd.gui.android/com.scytec.datamobile.vd.gui.android.SelectedList}: java.lang.NullPointerException..我只想显示复选框列表视图,并在每次选中时显示“选中”,但我不知道为什么这会给我一个异常。
public class SelectedList extends Activity implements IObserver{
private
我正在使用WinJS练习Windows开发,我有下面的代码,它解析了从特定URL接收到的JSON。使用要绑定到HTML页面中的列表视图的图像,
JavaScript代码:
WinJS.xhr({ url: urlToBeUsed }).then(
function (sportsResponse) {
var sportsJSON = JSON.parse(sportsResponse.responseText);
var listItems = sportsJSON.Videos.Data;
for (var i = 0;
我的.aspx页面上有很多ListView。在每个ListView的ItemTemplate内部都有一个复选框,ListView调用该复选框作为方法。对于其各自ListViews中的所有复选框,该方法都是相同的。
在该方法内部,我有获取触发事件的CheckBox对象和包含CheckBox对象的ListViewDataItem的代码:
// Gets the CheckBox object that fired the event.
CheckBox chkBox = (CheckBox)sender;
// Gets the item that contains the CheckBox ob
我在一个组合框中有三个对象,当它们被选中时,它们会在列表视图中列出。项目已添加,但行中没有类似于对象名称的文本。当我从我的Xaml中删除ListView.View时,项显示“(集合)”
//ComboBox Binding
public void BindComboBox()
{
using (DataClassesDataContext DC = new DataClassesDataContext())
{
cbItem.Items.Clear();
我处理插入查询的代码如下:
for (int i = 0; i <= ListView1.Items.Count - 1; i++)
{
con = new OleDbConnection(cn);
string cd = "INSERT INTO ProductSold(ID, invoiceID, description, rate, ps_quantity, ps_mrp, free, totalamount) VALUES (@ID,'" + txtInvoiceNo.Text +
我对此有意见。我正在使用光标适配器。我的问题是,当复选框被选中时,它将获得值,然后当单击按钮时,数据将被删除。顺便说一下,我正在使用listview显示复选框。
public class ListViewAdapter extends CursorAdapter {
SparseBooleanArray sba = new SparseBooleanArray();
public ListViewAdapter (Context context, Cursor c) {
super(context, c);
}
@Override
public View newView(Conte
我想将数据库中的内容添加到我在视图模型中声明的变量中。我的目标是将数据库中的数据显示到我的"View“页面中。我想知道如何做到这一点,因为我真的想使用模型-视图-视图模型方法。 这是我的ViewModel中的代码: using System.Text;
using WishListProject.Models;
using Xamarin.Forms;
namespace WishListProject.ViewModels
{
class GameListViewModel
{
public ObservableCollection<string> G
我试图在xamarin应用程序中显示和获取两个列表视图,以便从firebase数据库获取数据,所以我必须在上面绑定两个--我跟踪MVVM设计模式,这就是我所拥有的
查看模式页:
public class HomePageModelView : BaseViewModel
{
private ObservableCollection<Appoitment> _Appoitments = new ObservableCollection<Appoitment>();
public ObservableCollection<Ap
我有下面的具体类和干扰, public interface IMyViewModel
{
ObservableCollection<Person> People { get; set; }
}
public class MyViewModel : INotifyPropertyChanged, IMyViewModel
{
private ObservableCollection<Person> _people;
public ObservableCollection<Person> People
{
ge
我有这样的代码:
for (int i = 0; i < ListView2.Items.Count; i++)
{
int a;
Int32.TryParse(((TextBox)ListView2.Items[i].FindControl("BrankyTextBox")).ToString(), out a);
if (((CheckBox)ListView2.Items[i].FindControl("UcastCheckBox")).Checked=false &&
a > 0)
目前,我通过网格应用程序模板提供的data.js异步加载数据。由于groupedItems.js类的异步特性,在设置全局WinJS名称空间中的Data之前,StorageFile ( "Hub“页面)调用Data处理程序中的_initializeLayout时存在问题。
在data.js中
fileNames.forEach(function (val, index, arr) {
var uri = new Windows.Foundation.Uri('ms-appx:///data/' + val + '.geojson');
W
private String lv_arr[]={"Android","iPhone","BlackBerry","AndroidPeople"};
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
setContentView(R.layout.mylist);
lv1=(ListView)findViewById(R.id.ListView01);
// By using setAdpater method in listview we an add
我已经创建了一个片段,希望在其中显示listview,但是我的片段被删除了,没有显示listview,也没有收到错误。
我读过许多关于这个问题的解决方案,但我找不到合适的答案。一个小小的帮助将是great.thank你!
public class ServicesFragment extends Fragment {
public TextView servicesName;
ListView listView;
String[] servicesNameArray;
int[] serviceImages = {
R.drawable.
当我试图在安卓应用程序中使用RadListView插件时,我遇到了一个很大的问题(我还没有在iOS上尝试过,但我想问题会是一样的)。
按照的说明,我将插件添加到我的项目中。但是,一旦我将以下行添加到我的main.js中:
import RadListView from 'nativescript-ui-listview/vue';
我遇到了webpack错误的一面墙,例如:
System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to create appli
我的下一个问题
我想在listview中显示数据,然后得到一个Nullpointerexception。我的数据资源是一个SQLite数据库。在下面的文本中是活动和LogCat。
请帮帮我!
public class ListHaltestelleActivity extends Activity {
private SimpleAdapter simpleAdapter;
private SQLiteDatabase db;
protected static final String TAG = "DataAdapter";
private SQLiteDatabase m
我对我的代码有点纠结。我已经搜索并尝试了许多方法。我的目标是删除Firebase之前提供给我的应用程序的条目,firebase数据来自嵌入式设备。我想替换我的android应用程序中的值。
Firebase工作正常,应用程序将显示firebase提供的新值,但不会删除以前的条目。
我还有很多事情要做,但在继续之前,我想先解决一些基本问题。
因此,基本上OnChildChanged将显示新的Firebase条目,我只希望当来自firebase的新值出现时,从Android应用程序中删除之前的条目。
我已经调查了removeValue和setValue,但都没有结果
public class Ma
我有:
public abstract class V {}
public class PV extends V {}
public class TV extends V {}
我还有:
ListView<? extends V> listView = new ListView<>();
当我尝试的时候:
listView.setCellFactory(new Callback<ListView<? extends V>, ListCell<? extends V>>() {
@Override
.
我正在学习react-native,我遇到了这个问题。我有一个listView.js类,其中包含一个ListView,我想在index.android.js中显示它,我得到的错误是
The development server returned response error code: 500
URL: http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false
Body:
{"from":"D:\\ReactNative
我在一个片段中有一个列表视图,其中填充了来自JSON调用的信息。
我有一个问题,在我的片段中润湿列表视图。我的片段只扩展了片段,我想这可能就是我的问题所在。我用来帮助我导入json数据的示例代码没有使用片段,所以我有点困惑。
我的错误是:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference
at com.pe
我有个小问题。我一直在试图找出错误,但我找不到,如果你能指出它,或者给我一些更正,那就太好了。至于下面的代码:
using UIKit;
namespace App10
{
public class Application
{
// This is the main entry point of the application.
static void Main(string[] args)
{
var listView = new ListView();
listView.ItemsSource = new string[] {