我用SDK 1.6创建应用程序,我想,如果我的应用程序在android 3中运行:做某事,我使用这些代码,但错误告诉我HONEYCOMB
无法解决或不是字段.
这是我的代码:
if (Build.VERSION.RELEASE == Build.VERSION_CODES.HONEYCOMB) {
// do anything...
} else {
// do anything...
}
Run Code Online (Sandbox Code Playgroud) 我要让那些需要转换的应用程序ArrayList<String>[]
来ArrayList<Integer>[]
,我也用这样的:
ArrayList<String>[] strArrayList;
int ArrayRes = (int) strArrayList[];
Run Code Online (Sandbox Code Playgroud)
但这段代码给我一个错误,任何人都可以帮助我?
任何建议都会受到赞赏
我们都知道Windows 8将很快发布,Visual Studio 11也将发布.使用Visual Studio 11,您可以使Metro UI应用程序与WP7完全相同.
我的问题是,如果我们使用VS 11编程,它是否支持Windows 7,Vista和XP?
当我想用Java获取纯文本文件的最后一行时,我很困惑.我怎样才能做到这一点?哪个是不使用扫描仪的最佳方式?
谢谢
我可以在ACTION_DOWN上旋转图像视图.
但它不适用于ACTION_MOVE和ACTION_UP.
public class RotateImage extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Rotate rotate;
rotate = new Rotate(this);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(rotate);
}
}
public class Rotate extends ImageView {
Paint paint;
int direction = 0;
private float x;
private float y;
int degree = 0;
float a, b, c;
private float centerX ;
private float centerY ;
private float newX ;
private float newY ;
public Rotate(Context …
Run Code Online (Sandbox Code Playgroud) 我做了一个播放背景音乐的服务,但是当音乐完成后我想重播它.我可以在我的服务中使用哪种方法?
public class BackgroundSoundService extends Service {
private static final String TAG = null;
MediaPlayer player;
public IBinder onBind(Intent arg0) {
return null;
}
@Override
public void onCreate() {
super.onCreate();
player = MediaPlayer.create(this, R.raw.idil);
player.setVolume(100,100);
}
public int onStartCommand(Intent intent, int flags, int startId) {
player.start();
return 1;
}
public void onStart(Intent intent, int startId) {
// TODO
}
public IBinder onUnBind(Intent arg0) {
// TODO Auto-generated method stub
return null;
}
public void onStop() {
}
public void onPause() …
Run Code Online (Sandbox Code Playgroud) 我有调用的布局,Main.XML
我将方向设置为我的肖像AndroidManifest.xml
.我设计了这个布局蜂窝太大,并把它放在在layout-xlarge-mdpi
文件夹中,但我想使用 Main.XML
在layout-xlarge-mdpi
只在横向方向.
现在,怎么办呢?
谢谢