Search in sources :

Example 51 with LayoutParams

use of android.widget.FrameLayout.LayoutParams in project superCleanMaster by joyoyao.

the class SystemBarTintManager method setupStatusBarView.

private void setupStatusBarView(Context context, ViewGroup decorViewGroup) {
    mStatusBarTintView = new View(context);
    LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, mConfig.getStatusBarHeight());
    params.gravity = Gravity.TOP;
    if (mNavBarAvailable && !mConfig.isNavigationAtBottom()) {
        params.rightMargin = mConfig.getNavigationBarWidth();
    }
    mStatusBarTintView.setLayoutParams(params);
    mStatusBarTintView.setBackgroundColor(DEFAULT_TINT_COLOR);
    mStatusBarTintView.setVisibility(View.GONE);
    decorViewGroup.addView(mStatusBarTintView);
}
Also used : LayoutParams(android.widget.FrameLayout.LayoutParams) View(android.view.View)

Example 52 with LayoutParams

use of android.widget.FrameLayout.LayoutParams in project android_packages_apps_Dialer by LineageOS.

the class OldSpeedDialFragment method setEmptyViewVisibility.

/* package */
void setEmptyViewVisibility(final boolean visible) {
    final int previousVisibility = emptyView.getVisibility();
    final int emptyViewVisibility = visible ? View.VISIBLE : View.GONE;
    final int listViewVisibility = visible ? View.GONE : View.VISIBLE;
    if (previousVisibility != emptyViewVisibility) {
        final FrameLayout.LayoutParams params = (LayoutParams) contactTileFrame.getLayoutParams();
        params.height = visible ? LayoutParams.WRAP_CONTENT : LayoutParams.MATCH_PARENT;
        contactTileFrame.setLayoutParams(params);
        emptyView.setVisibility(emptyViewVisibility);
        listView.setVisibility(listViewVisibility);
    }
}
Also used : LayoutParams(android.widget.FrameLayout.LayoutParams) LayoutParams(android.widget.FrameLayout.LayoutParams) FrameLayout(android.widget.FrameLayout)

Example 53 with LayoutParams

use of android.widget.FrameLayout.LayoutParams in project android_packages_apps_Dialer by LineageOS.

the class NewSearchFragment method setHeight.

private void setHeight(int start, int end, float percentage) {
    View view = getView();
    if (view == null) {
        return;
    }
    FrameLayout.LayoutParams params = (LayoutParams) view.getLayoutParams();
    params.height = (int) (start + (end - start) * percentage);
    view.setLayoutParams(params);
}
Also used : LayoutParams(android.widget.FrameLayout.LayoutParams) LayoutParams(android.widget.FrameLayout.LayoutParams) FrameLayout(android.widget.FrameLayout) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) EmptyContentView(com.android.dialer.widget.EmptyContentView)

Aggregations

LayoutParams (android.widget.FrameLayout.LayoutParams)53 View (android.view.View)28 FrameLayout (android.widget.FrameLayout)17 TextView (android.widget.TextView)6 Intent (android.content.Intent)5 Rect (android.graphics.Rect)5 ViewGroup (android.view.ViewGroup)5 SystemServicesProxy (com.android.systemui.recents.misc.SystemServicesProxy)5 RecentsPackageMonitor (com.android.systemui.recents.model.RecentsPackageMonitor)5 Point (android.graphics.Point)4 ImageView (android.widget.ImageView)4 SuppressLint (android.annotation.SuppressLint)2 TargetApi (android.annotation.TargetApi)2 Activity (android.app.Activity)2 Application (android.app.Application)2 TypedArray (android.content.res.TypedArray)2 ViewTreeObserver (android.view.ViewTreeObserver)2 AbsListView (android.widget.AbsListView)2 AdapterView (android.widget.AdapterView)2 ScrollView (android.widget.ScrollView)2