• 這是一篇加密文章,請輸入密碼
  • 密碼提示:call
  • 請輸入密碼:
  • 這是一篇加密文章,請輸入密碼
  • 密碼提示:call
  • 請輸入密碼:
  • 這是一篇加密文章,請輸入密碼
  • 密碼提示:cell
  • 請輸入密碼:
  • 這是一篇加密文章,請輸入密碼
  • 密碼提示:call
  • 請輸入密碼:

下載Tomcat 把環境變數->系統變數 增加名稱: CATALINA_HOME 、值:Tomcat路徑 

文章標籤

JBLin 發表在 痞客邦 留言(0) 人氣()

WindowManager windowManager = null;//系統層
WindowManager.LayoutParams params = null;//排版

params = new WindowManager.LayoutParams(//排版設定
        WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN,
        WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
        PixelFormat.TRANSLUCENT);
windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);

 

params.width = WindowManager.LayoutParams.MATCH_PARENT;//物件layout的寬
params.height = 60;
params.gravity = Gravity.TOP;//物件layout的位子
titleBG = new ImageView(this);//物件init
titleBG.setBackgroundColor(Color.parseColor("#501f2424"));//物件設定圖片及顏色
windowManager.addView(titleBG, params);//將物件及排版加入windowManager

文章標籤

JBLin 發表在 痞客邦 留言(0) 人氣()

<application 
android:theme="@style/translucent">
</application>

//背景透明

<style name="translucent" parent="@android:style/Theme.Translucent">
    <item name="android:windowNoTitle">true</item>
</style>

//背景設定一張圖片

文章標籤

JBLin 發表在 痞客邦 留言(0) 人氣()

<manifests.xml>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
 
private MediaPlayer player;
private MediaRecorder recoder;
private String filePath = Environment.getExternalStorageDirectory()+"/recoder.3gpp";//儲存位置
<button觸發>
public void start(View v) throws IOException {
    if(player != null)
        player.release();
    File outFile = new File(filePath);
    if(outFile.exists())
        outFile.delete();
    recoder = new MediaRecorder();
    recoder.setAudioSource(MediaRecorder.AudioSource.MIC);
    recoder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
    recoder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
    recoder.setOutputFile(filePath);
    recoder.prepare();
    recoder.start();
}
public void stop(View v){
    if(recoder != null)
        recoder.stop();
}

JBLin 發表在 痞客邦 留言(0) 人氣()

<AndroidManifest.xml>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"></uses-permission>
<receiver android:name=".className">
    <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED"></action>
    </intent-filter>
</receiver>

<.java>

public class className extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        
    }
}

文章標籤

JBLin 發表在 痞客邦 留言(0) 人氣()

.xml
<TextView android:scrollbars = "vertical"/>

程式碼:

private int pageIndex = 0 ;
private TextView text;
text = (TextView) findViewById(R.id.text);
text.setMovementMethod(new ScrollingMovementMethod(){
    @Override
    public boolean onKeyDown(TextView widget, Spannable text, int keyCode, KeyEvent event) {
        if(keyCode == KeyEvent.KEYCODE_DPAD_DOWN){//
            nextText();
            return false;
        }else if(keyCode == KeyEvent.KEYCODE_DPAD_UP){
            preText();
            return false;
        }
        return super.onKeyDown(widget, text, keyCode, event);
    }
});
private void nextText(){
    if(pageIndex == 0){
        image.setVisibility(View.GONE);
        text.scrollTo(0, text.getLayout().getLineTop(行數* (pageIndex+1)));
        pageIndex++;
    }else if(text.canScrollVertically(1)){
        text.scrollTo(0, text.getLayout().getLineTop(* (pageIndex+1)));
        pageIndex++;
    }
}

 

文章標籤

JBLin 發表在 痞客邦 留言(0) 人氣()