本文整理汇总了Java中android.widget.TableRow.setVisibility方法的典型用法代码示例。如果您正苦于以下问题:Java TableRow.setVisibility方法的具体用法?Java TableRow.setVisibility怎么用?Java TableRow.setVisibility使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.TableRow
的用法示例。
在下文中一共展示了TableRow.setVisibility方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInfoContents
import android.widget.TableRow; //导入方法依赖的package包/类
/**
* Defines the contents of the InfoWindow
*
* The info window could be more advanced, if possible, by using
* more available items as explained in the related issue here:
* https://github.com/CellularPrivacy/Android-IMSI-Catcher-Detector/issues/234
*
*/
public View getInfoContents(MarkerData data) {
TextView tv;
// Getting view from the layout file: marker_info_window.xml
View v = LayoutInflater.from(mContext).inflate(R.layout.marker_info_window, null);
if (v != null) {
if (data != null) {
// We would also like to show this in HEX: "CID: 65535 (0xFFFF)"
if (data.openCellID) {
TableRow tr = (TableRow) v.findViewById(R.id.open_cell_label);
tr.setVisibility(View.VISIBLE);
}
tv = (TextView) v.findViewById(R.id.cell_id); // CID
tv.setText(data.cellID);
tv = (TextView) v.findViewById(R.id.lac); // LAC
tv.setText(data.lac);
tv = (TextView) v.findViewById(R.id.lat); // LAT
tv.setText(String.valueOf(data.lat));
tv = (TextView) v.findViewById(R.id.lng); // LON
tv.setText(String.valueOf(data.lng));
tv = (TextView) v.findViewById(R.id.psc); // PSC
tv.setText(data.getPSC());
tv = (TextView) v.findViewById(R.id.rat); // RAT
tv.setText(data.getRAT());
tv = (TextView) v.findViewById(R.id.pc); // PC = <MNC> "-" <MCC>
tv.setText(data.getPC());
tv = (TextView) v.findViewById(R.id.samples); // Samples
tv.setText(data.getSamples());
}
}
// Returning the view containing InfoWindow contents
return v;
}