窗口样式的activity显示位置

activity显示成窗口样式后,默认是显示在中间,但是想要实现显示在任意位置,方法如下:


 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  //关键代码
  WindowManager.LayoutParams lp = getWindow().getAttributes();
  lp.width = LayoutParams.FILL_PARENT;
  lp.gravity = Gravity.TOP;
  getWindow().setAttributes(lp);
 }

这样activity就在屏幕的顶部显示了。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Activity Grader What is it? ----------- This application opens all activities in a given folder in PT, extracts the grade and then outputs a CSV file with the filename, total percentage and sub component scores. System Requirements ------------------- JRE: 1.8 or above (http://java.com/getjava/) Packet Tracer 7.0 or above Upgrading Activity Grader ------------------------- If there is a previous version of Activity Grader installed, remove it from the approved list and delete the "extensions\ActivityGrader" folder. Then follow the "Installing Activity Grader" section. Installing Activity Grader -------------------------- 1) Unzip ActivityGrader.zip 2) Copy the "ActivityGrader" folder to "<Packet Tracer Installation Folder>\extensions" Typically: C:\Program Files\Packet Tracer\extensions 3) Add ActivityGrader.pta using the IPC menu. a) Extensions Menu -> IPC -> Configure Apps b) Click on the Add button c) Select the folder "ActivityGrader" d) Select the ActivityGrader.pta file, then OK (See PT Help and Tutorials for additional information) Launching the Application ------------------------- There are two ways to launch the application. A) Within Packet Tracer: 1) Extensions Menu -> IPC -> Configure Apps 2) Select Activity Grader from App List 3) Click on Launch button B) Standalone, execute "extensions\ActivityGraderx86.exe". This method does not launch Packet Tracer automatically. Packet Tracer must be already running and the IPC enabled at port 39000. For either method, Packet Tracer must allow this application to use the IPC. (See Step 3: Installing) Using the Application --------------------- This application uses the activity filenames as the index. So, it would be best to have students append their name or student ID to the activity filename for submission. The location of the activity files should be in a single directory. This directory may be a local disk, network drive, or flash usb drive -- anywhere that Packet Tracer can access. 1) Enter the location of the activities or browse 2) Click Grade A Comma Separated Value (CSV) file will be created in the directory where the activity files are stored.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值