View Groupプロパティ・ノット

3329 ワード

View Groupプロパティ・ノット:
改善すべき点
ツールバーの
  • android:addStatesFromChildren :Sets whether this ViewGroup's drawable states also include its children's drawable states.[booean]:親コントロールと子コントロールのステータスが関連付けられているかどうかを定義します.(サブコントロールがフォーカスを取得するとき、レイアウト全体)例:サブコントロールがフォーカスを取得するときにレイアウト全体にフォーカスを取得します.
  • android:alwaysDrawnWithCache :Defines whether the ViewGroup should always draw its children using their drawing cache or not. [boolean]のデフォルトはtrueです.バッファを使用してコントロールを描画するかどうかを定義します.
  • android:animateLayoutChanges :Defines whether changes in layout (caused by adding and removing items) should cause a LayoutTransition to run.[boolean]:レイアウト変更時のアニメーションを定義します.trueに設定すると、既定のLayoutTransitionオブジェクトと既定のアニメーションが作成されます.方法
  • setLayoutTranstiton(LayoutTransition)

  • android:animationCache :Defines whether layout animations should create a drawing cache for their children. [boolean]:親コントロールがサブコントロールのペイントキャッシュを作成するかどうかを定義します.機能:パフォーマンスは最適化されますが、より多くのメモリが消費されます.
  • android:clipChildren:Defines whether a child is limited to draw inside of its bounds or not.[boolean]デフォルトはtrueです.サブコントロールが親コントロール領域に制限されるかどうかを定義する方法
  • setClipChildren(boolean)

  • android:clipToPadding :Defines whether the ViewGroup will clip its children and resize (but not clip) any EdgeEffect to its padding, if padding is not zero. [boolean]デフォルトtrue:親コントロールがサブコントロールのサイズを制限し、エッジの塗りつぶしに適しているかどうかを定義します.方法
  • setClipToPadding(boolean)

  • android:descendantFocusability :Defines the relationship between the ViewGroup and its descendants when looking for a View to take focus.[enum]:親コントロールと子コントロールのフォーカス取得時の関係プロパティ値を定義します.
  • beforeDescendants:0,The ViewGroup will get focus before any of its descendants.
  • afterDescendants:1,The ViewGroup will get focus only if none of its descendants want it.
  • blocksDescendants:2,The ViewGroup will block its descendants from receiving focus.

  • android:layoutAnimation : Defines the layout animation to use the first time the ViewGroup is laid out.[reference]:終了時にレイアウトコントロールを定義するアニメーション
  • android:layoutMode :Defines the layout mode of this ViewGroup. [enum]:レイアウトを定義するモード:プロパティ値
  • clipBounds:0,Use the children's clip bounds when laying out this container.
  • opticalBounds:1,Use the children's optical bounds when laying out this container.

  • 方法
  • setLayoutMode(int)

  • android:persistentDrawingCache :Defines the persistence of the drawing cache.[enum]:プロパティ値
  • none:0x0,The drawing cache is not persisted after use.
  • animation:0x1,The drawing cache is persisted after a layout animation.
  • scrolling:0x2,The drawing cache is persisted after a scroll.
  • all:0x3,The drawing cache is always persisted.

  • android:splitMotionEvents :Sets whether this ViewGroup should split MotionEvents to separate child views during touch event dispatch.[boolean]デフォルトfalse:レイアウトがアクションイベントをサブコントロールに割り当てるかどうか.方法
  • setMotionEventSplittingEnabled(boolean)