發表文章

目前顯示的是 12月, 2016的文章

「Android誌」 FrameLayout 佈局

圖片
FrameLayout是所有的Layout裡最單純的一個,在FrameLayout裡面假設有一個以上的元件,則會以在最上層的元件為主,假若有數個元件,其大小皆相同,此時只會看到第一個元件,其他元件會被蓋在下面,而無法顯現在畫面中;若是不同大小的元件,則會看到由下到上的元件。 JAVA package com.example.administrator.sqlite; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } } XML <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.administrator.sqlite.MainActivity"> <TextView android:layout_width="fill_parent" android:layout_height="fill_...

「Android誌」為程式碼自動上色

<pre class="codeblock prettyprint linenums:1"> 中間可以插入你想放入的程式碼 </pre>

「Android誌」Android int to string, string to int, 整數轉字串、字串轉整數

整數轉字串 String stringValue = Integer.toString(12345); String stringValue = String.valueOf(12345); 字串轉整數 int intValue = Integer.valueOf("12345"); int intValue = Integer.parseInt("12345");