您的位置:首页 > 移动开发 > Android开发

Android软键盘的显示与隐藏

2012-07-30 10:51 435 查看
Take Android's Calculator (package com.android.calculator2; URL https://android.googlesource.com/platform/packages/apps/Contacts) as an example.

 

 

Since Calculator.java makes reference to anroid.support package by the following statements, you should include Android Support library for the project.

 

 

import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;

 
 

Right click on the project in the Project Explorer, choose Build Path>Configure Build Path.

On the shown dialog, choose Java Build Path and change to Libraries tab.

Click Add External JARs and choose android-support-v4.jar which by default is stored in extras\android\support\v4 under Android SDK root directory.

 

CalculatorEditText.java imports com.google.common classes, as a result of which you need to add google's guavalib.jar in External JARs.

 

import com.google.common.collect.ImmutableMap;

 

In addition, the Calculator module also makes use of javia package. So you need to delcare arity.jar in External JARs. Arity is an open source project hosted on google code.

 

In summary, declare arity.jar, guavalib.jar and Android's android-support-v4.jar in External JARs, and you will be succeeded with making the project build.

 

 

 

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: