我在我的应用中创建了带有选项卡的滑动视图,并使用listview作为我的数据json url。我的应用程序运行正常,但问题在于当我午餐应用程序空着活动时。
如下所示,这是java类,我在其中处理选项卡中的操作。
主要活动:
package com.iraqairoirt.iraqairports
import android.annotation.SuppressLint
import android.support.v7.widget.AppCompatTextView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.BaseAdapter
class ListAdapte (val context: fragment_Dep, val list: ArrayList<FlightShdu>): BaseAdapter() {
@SuppressLint("ViewHolder")
override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View {
val view : View = LayoutInflater.from(context.context).inflate(R.layout.row_layout,parent,false)
val CallsingID = view.findViewById(R.id.callsign_id) as AppCompatTextView
val StatusID = view.findViewById(R.id.status_id) as AppCompatTextView
CallsingID.text = list[position].Callsign.toString()
StatusID.text = list[position].Status
return view
}
override fun getItem(position: Int): Any {
return list [position]
}
override fun getItemId(position: Int): Long {
return position.toLong()
}
override fun getCount(): Int {
return list.size
}
}
ListAdapte
<?php echo getBhQuery('search','JobOrder','isOpen:true','id,title,categories,dateAdded,externalCategoryID,employmentType,customText12', null, 10, '-dateAdded');?>
当我用ListView打开片段时有空白屏幕吗?