当前位置: 首页>>代码示例>>Java>>正文


Java TableRow.setVisibility方法代码示例

本文整理汇总了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;
}
 
开发者ID:anticomarley,项目名称:Android-IMSI-Catcher-Detector,代码行数:45,代码来源:CellTowerMarker.java


注:本文中的android.widget.TableRow.setVisibility方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。