本文整理匯總了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;
}