⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 deleteitems.java

📁 Android平台上的media player, iPhone风格
💻 JAVA
字号:
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package com.android.imusic;import android.app.Activity;import android.content.ContentResolver;import android.content.ContentValues;import android.content.Intent;import android.database.Cursor;import android.media.AudioManager;import android.net.Uri;import android.os.Bundle;import android.provider.MediaStore;import android.text.TextWatcher;import android.util.Log;import android.view.KeyEvent;import android.view.View;import android.view.Window;import android.view.WindowManager;import android.widget.Button;import android.widget.EditText;import android.widget.TextView;import android.widget.Toast;public class DeleteItems extends Activity{    private TextView mPrompt;    private Button mButton;    private int [] mItemList;    @Override    public void onCreate(Bundle icicle) {        super.onCreate(icicle);        setVolumeControlStream(AudioManager.STREAM_MUSIC);        requestWindowFeature(Window.FEATURE_NO_TITLE);        setContentView(R.layout.confirm_delete);        getWindow().setLayout(WindowManager.LayoutParams.FILL_PARENT,                                    WindowManager.LayoutParams.WRAP_CONTENT);        mPrompt = (TextView)findViewById(R.id.prompt);        mButton = (Button) findViewById(R.id.delete);        mButton.setOnClickListener(mButtonClicked);        ((Button)findViewById(R.id.cancel)).setOnClickListener(new View.OnClickListener() {            public void onClick(View v) {                finish();            }        });        Bundle b = getIntent().getExtras();        String desc = b.getString("description");        mItemList = b.getIntArray("items");                String promptformat = getString(R.string.delete_confirm_prompt);        String prompt = String.format(promptformat, desc);        mPrompt.setText(prompt);    }        private View.OnClickListener mButtonClicked = new View.OnClickListener() {        public void onClick(View v) {            // delete the selected item(s)            MusicUtils.deleteTracks(DeleteItems.this, mItemList);            finish();        }    };}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -