liguofeng29’s blog

個人勉強用ブログだっす。

┗━UI

AndroidのUI - ContextMenu

activity_main.xml

AndroidのUI - ActionBar

activity_main.xml

AndroidのUI - PopupMenu

activity_main.xml

AndroidのUI - MenuItem to Activity

AndroidManifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.xxxxx.menutoactivity" > </manifest>

AndroidのUI - Menu

activity_main.xml

AndroidのUI - ProgressDialog

activity_main.xml

AndroidのUI - DatePickerDialogとTimePickerDialog

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - PopupWindow

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal"> </linearlayout>

AndroidのUI - DialogTheme

activity_main.xml

AndroidのUI - AlertDialog

activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > </relativelayout>

AndroidのUI - ViewFlipper

activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> </relativelayout>

AndroidのUI - TextSwitcher

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - ImageSwitcher

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - ViewSwitcher

activity_main.xml

AndroidのUI - ProgressBar & SeekBar & RatingBar

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > </linearlayout>

AndroidのUI - StackView

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - AdapterViewFilpper

activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </relativelayout>

AndroidのUI - Spinner

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - ExpandableListView

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - GridView

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - AutoCompleTextViewとMultiAutoCompleteTextView

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - BaseAdapterでListView作成

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - SimpleAdapterでListView作成

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - ArrayAdapterでListView作成

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - ListView

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > </linearlayout>

AndroidのUI - QuickContactBadge

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > </linearlayout>

AndroidのUI - ImageButtonとZoomButton

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - ImageView

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - Chronometer

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:gravity="center|top"> </linearlayout>

AndroidのUI - TextClockとAnalogClock

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - ToggleButtonとSwitch

activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - CheckBoxとRadioButton

activity_main.xml <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <TableRow> </tablerow></tablelayout>

AndroidのUI - Button

editText.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - EditText

editText.xml <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:stretchColumns="1"> <TableRow> </tablerow></tablelayout>

AndroidのUI - TextView

textView.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:padding="5dp"> </linearlayout>

AndroidのUI - 単位

単位説明 px(ピクセル) ディスプレイの点 dip(dp)(device independent pixels) 1インチ160点のディスプレイの場合、1dip = 1px sp(scaled pixels, 比例ピクセル) 主にフォントサイズを処理 in インチ mm ミリ pt 1/72インチ

AndroidのUI - AbsoluteLayout

activity_main.xml <AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> </absolutelayout>

AndroidのUI - RelativeLayout

activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> </relativelayout>

AndroidのUI - GridLayout

activity_main.xml <GridLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:columnCount="4" android:rowCount="6" android:id="@+id/root" > </gridlayout>

AndroidのUI - FrameLayout2

MainActivity.java package com.example.liguofeng.framelayout;import android.os.Handler;import android.os.Message;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import android.widget.TextView;import java.util.Timer;…

AndroidのUI - FrameLayout

activity_main.xml <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"> </framelayout>

AndroidのUI - TableLayout

tableLayout.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> </linearlayout>

AndroidのUI - LinearLayout

linearLayout.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:gravity="right|center_vertical"> </linearlayout>

AndroidのUI - INDEX

レイアウトマネージャ Layout種類説明 LinearLayout ・ViewGroupを継承 ・縦OR横水平のレイアウト ・一列に収まらない場合、自動改行はしない。 ・android:orientation=<horizontal|vertical> 縦か横か ・android:gravity 配置位置top,bottom,left,rithgなどなど) TableLayout ・L</horizontal|vertical>…