Java TableFixHeaders 类用法示例
最编程
2024-05-22 08:48:13
...
实例1: onCreateView
import com.inqbarna.tablefixheaders.TableFixHeaders; //导入依赖的package包/类
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.entity_table, container);
TableFixHeaders table = (TableFixHeaders) view.findViewById(R.id.entity_table);
NodeMatrixTableAdapter adapter = new NodeMatrixTableAdapter(selectedNode, getActivity());
table.setAdapter(adapter);
return view;
}
实例2: onResume
import com.inqbarna.tablefixheaders.TableFixHeaders; //导入依赖的package包/类
public void onResume() {
super.onResume();
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
lp.copyFrom(getDialog().getWindow().getAttributes());
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
getDialog().getWindow().setAttributes(lp);
TableFixHeaders table = (TableFixHeaders) getView().findViewById(R.id.entity_table);
NodeMatrixTableAdapter adapter = (NodeMatrixTableAdapter) table.getAdapter();
int[] selectedCoordinate = adapter.selectedCoordinate();
table.scrollTo(selectedCoordinate[0], selectedCoordinate[1]);
}
推荐阅读
-
实操演示:Java BaseResponse类的第四个应用场景——onResponse方法示例
-
实操示例:在Java中运用ChannelMatcher类
-
实操示例:在Java中运用WebSocketClientProtocolHandler类
-
实操演示:Java中Cosine相似度计算类的运用示例
-
彻底掌握泛型:<T> T与T的用法详解、get方法示例(返回List<E>, E为任意类型) - 泛型原理、类型擦除、 wildcards应用及泛型类和继承的实际运用
-
实例讲解Java中泛型与Class类的使用方法与示例
-
实操示例:利用Java ConverterManager类的运用方法
-
实操指南:Java Web Service 中 Feature 类的运用示例
-
实操指南:Java FeatureCollection类的运用示例
-
实操示例:在Java中运用MySQLTransactionRollbackException类