当前位置: 首页>>代码示例>>Java>>正文


Java FrameLayout.setVisibility方法代码示例

本文整理汇总了Java中android.widget.FrameLayout.setVisibility方法的典型用法代码示例。如果您正苦于以下问题:Java FrameLayout.setVisibility方法的具体用法?Java FrameLayout.setVisibility怎么用?Java FrameLayout.setVisibility使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.widget.FrameLayout的用法示例。


在下文中一共展示了FrameLayout.setVisibility方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import android.widget.FrameLayout; //导入方法依赖的package包/类
public void init() {
    recyclerView = (RecyclerView) findViewById(R.id.student_recyclerview);
    btnSearch = (ToggleButton)findViewById(R.id.btn_search_student);
    btnSearchOk = (Button)findViewById(R.id.btn_search_ok_student);
    btnBack = (Button) findViewById(R.id.btn_back_student);
    editTextSearch =(EditText)findViewById(R.id.etxt_search_student);
    frameLayoutSearch = (FrameLayout)findViewById(R.id.frame_search_student);
    txtMsgContent = (TextView) findViewById(R.id.message_label_stud);

    frameLayoutSearch.setVisibility(View.GONE);
    txtMsgContent.setVisibility(View.INVISIBLE);

    btnSearch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
        public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
            if (isChecked)
                frameLayoutSearch.setVisibility(View.VISIBLE);
            else
                frameLayoutSearch.setVisibility(View.GONE);
        }
    });
}
 
开发者ID:inteliedoit,项目名称:thesis-project,代码行数:22,代码来源:StudentViewActivity.java

示例2: loadWebIde

import android.widget.FrameLayout; //导入方法依赖的package包/类
public void loadWebIde() {
    MLog.d(TAG, "loadWebIde");

    if (mWebViewFragment != null) return;

    FrameLayout fl = (FrameLayout) findViewById(R.id.fragmentEditor);
    fl.setVisibility(View.VISIBLE);
    MLog.d(TAG, "using webide");
    mWebViewFragment = new APIWebviewFragment();

    Bundle bundle = new Bundle();
    // String url = "http://127.0.0.1:8585";
    String url = "http://10.0.2.2:8080";
    bundle.putString("url", url);
    bundle.putBoolean("isTablet", mIsTablet);
    mWebViewFragment.setArguments(bundle);

    addFragment(mWebViewFragment, R.id.fragmentEditor, "qq");

    // mWebViewFragment.webView.loadUrl(url);
}
 
开发者ID:victordiaz,项目名称:phonk,代码行数:22,代码来源:MainActivity.java

示例3: onCreate

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.help_activity);

    setupActivity();

    FrameLayout fl = (FrameLayout) findViewById(R.id.fragmentWebview);
    fl.setVisibility(View.VISIBLE);
    MLog.d(TAG, "using webide");
    APIWebviewFragment webViewFragment = new APIWebviewFragment();
    Bundle bundle = new Bundle();
    bundle.putString("url", "http://127.0.0.1:8585");
    webViewFragment.setArguments(bundle);
    // addFragment(webViewFragment, R.id.fragmentEditor, "qq");
}
 
开发者ID:victordiaz,项目名称:phonk,代码行数:17,代码来源:AboutActivity.java

示例4: onSetupTabAdapter

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
protected void onSetupTabAdapter(ViewPageFragmentAdapter adapter) {

    FrameLayout generalActionBar = (FrameLayout) mRoot.findViewById(R.id.general_actionbar);
    generalActionBar.setVisibility(View.GONE);

    String[] title = getResources().getStringArray(
            R.array.opensourcesoftware);
    adapter.addTab(title[0], "software_catalog",
            SoftwareCatalogListFragment.class, null);
    adapter.addTab(title[1], "software_recommend",
            SoftwareListFragment.class,
            getBundle(SoftwareList.CATALOG_RECOMMEND));
    adapter.addTab(title[2], "software_latest", SoftwareListFragment.class,
            getBundle(SoftwareList.CATALOG_TIME));
    adapter.addTab(title[3], "software_hot", SoftwareListFragment.class,
            getBundle(SoftwareList.CATALOG_VIEW));
    adapter.addTab(title[4], "software_china", SoftwareListFragment.class,
            getBundle(SoftwareList.CATALOG_LIST_CN));
}
 
开发者ID:hsj-xiaokang,项目名称:OSchina_resources_android,代码行数:21,代码来源:OpenSoftwareFragment.java

示例5: init

import android.widget.FrameLayout; //导入方法依赖的package包/类
public void init() {
    recyclerView = (RecyclerView) findViewById(R.id.teacher_schedule_recyclerview);
    btnSearch = (ToggleButton) findViewById(R.id._btn_search_schedule);
    btnSearchOk = (Button) findViewById(R.id._btn_search_ok_schedule);
    btnBack = (Button) findViewById(R.id.btn_back_schedule);
    editTextSearch = (EditText) findViewById(R.id.etxt_search_schedule);
    frameLayoutSearch = (FrameLayout) findViewById(R.id.frame_search_schedule);
    txtMsgContent = (TextView) findViewById(R.id.message_label_sc1);

    frameLayoutSearch.setVisibility(View.GONE);
    txtMsgContent.setVisibility(View.INVISIBLE);

    btnSearch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
            if (isChecked)
                frameLayoutSearch.setVisibility(View.VISIBLE);
            else
                frameLayoutSearch.setVisibility(View.GONE);
        }
    });
}
 
开发者ID:inteliedoit,项目名称:thesis-project,代码行数:23,代码来源:ScheduleViewActivity.java

示例6: onCreate

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.i(TAG, "onCreate");
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    btnSearch = (ToggleButton) findViewById(R.id.btn_search_class);
    btnSearchOk = (Button) findViewById(R.id._btn_search_ok_class);
    btnBack = (Button) findViewById(R.id.btn_back_student);

    editTextSearch = (EditText) findViewById(R.id.etxt_search_class);
    frameLayoutSearch = (FrameLayout) findViewById(R.id.frame_search_class);
    tabLayout = (TabLayout) findViewById(R.id.tabs);
    viewPager = (ViewPager) findViewById(R.id.viewpager);
    setupViewPager(viewPager);
    tabLayout.setupWithViewPager(viewPager);
    setupTabIcons();

    frameLayoutSearch.setVisibility(View.GONE);
    btnSearch.setOnCheckedChangeListener(this);


}
 
开发者ID:inteliedoit,项目名称:thesis-project,代码行数:24,代码来源:MainActivity2.java

示例7: notifyDataSetChanged

import android.widget.FrameLayout; //导入方法依赖的package包/类
/**
 * 数据更新通知
 */
public void notifyDataSetChanged() {
    int num = getChildCount();
    for (int i = 0; i < num; i++) {
        FrameLayout frameLayout = (FrameLayout) getChildAt(i);
        int tag = Integer.parseInt(frameLayout.getTag().toString());
        if (tag > 0 && tag < adapter.getItemCount()) {
            frameLayout.setVisibility(View.VISIBLE);
            adapter.bindView(frameLayout.getChildAt(0), tag);
        } else {
            frameLayout.setVisibility(View.INVISIBLE);
        }

        if (i == 3 && tag == 0) {
            adapter.displaying(0);
        }
    }
}
 
开发者ID:yangchong211,项目名称:YCCardView,代码行数:21,代码来源:CardViewLayout.java

示例8: createVHForRefreshComponent

import android.widget.FrameLayout; //导入方法依赖的package包/类
private ListBaseViewHolder createVHForRefreshComponent(int viewType) {
  FrameLayout view = new FrameLayout(getContext());
  view.setBackgroundColor(Color.WHITE);
  view.setLayoutParams(new FrameLayout.LayoutParams(1, 1));
  view.setVisibility(View.GONE);
  return new ListBaseViewHolder(view, viewType);
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:8,代码来源:BasicListComponent.java

示例9: attachSwipeInfoViews

import android.widget.FrameLayout; //导入方法依赖的package包/类
/**
 * @param frame
 * @param swipeViewBinder
 * @param swipeDecor
 * @param <V>
 * @param <T>
 */
protected <V extends FrameLayout, T extends SwipeViewBinder> void attachSwipeInfoViews(V frame, T swipeViewBinder, SwipeDecor swipeDecor) {

    if (swipeDecor.getSwipeInMsgLayoutId() != SwipeDecor.PRIMITIVE_NULL
            && swipeDecor.getSwipeOutMsgLayoutId() != SwipeDecor.PRIMITIVE_NULL) {

        FrameLayout swipeInMsgView = new FrameLayout(getContext());
        FrameLayout swipeOutMsgView = new FrameLayout(getContext());

        LayoutParams layoutParamsInMsg = new LayoutParams(
                ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);

        LayoutParams layoutParamsOutMsg = new LayoutParams(
                ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);

        layoutParamsInMsg.gravity = mSwipeDecor.getSwipeInMsgGravity();
        layoutParamsOutMsg.gravity = mSwipeDecor.getSwipeOutMsgGravity();

        swipeInMsgView.setLayoutParams(layoutParamsInMsg);
        swipeOutMsgView.setLayoutParams(layoutParamsOutMsg);

        mLayoutInflater.inflate(swipeDecor.getSwipeInMsgLayoutId(), swipeInMsgView, true);
        mLayoutInflater.inflate(swipeDecor.getSwipeOutMsgLayoutId(), swipeOutMsgView, true);

        frame.addView(swipeInMsgView);
        frame.addView(swipeOutMsgView);

        swipeInMsgView.setVisibility(GONE);
        swipeOutMsgView.setVisibility(GONE);

        swipeViewBinder.setSwipeInMsgView(swipeInMsgView);
        swipeViewBinder.setSwipeOutMsgView(swipeOutMsgView);
    }
}
 
开发者ID:sinhaDroid,项目名称:BlogBookApp,代码行数:41,代码来源:SwipePlaceHolderView.java

示例10: createBottomSelectionBar

import android.widget.FrameLayout; //导入方法依赖的package包/类
/**
     * Creates bottom selection bar to show selected days
     */
    private void createBottomSelectionBar() {
        flBottomSelectionBar = new FrameLayout(getContext());
//        flBottomSelectionBar.setLayoutTransition(new LayoutTransition());
        flBottomSelectionBar.setId(View.generateViewId());
        RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
        params.addRule(RelativeLayout.BELOW, rvMonths.getId());
        flBottomSelectionBar.setLayoutParams(params);
        flBottomSelectionBar.setBackgroundResource(R.drawable.border_top_bottom);
        flBottomSelectionBar.setVisibility(settingsManager.getCalendarOrientation() == OrientationHelper.HORIZONTAL ? View.VISIBLE : View.GONE);
        addView(flBottomSelectionBar);

        createMultipleSelectionBarRecycler();
        createRangeSelectionLayout();
    }
 
开发者ID:ApplikeySolutions,项目名称:CosmoCalendar,代码行数:18,代码来源:CalendarView.java

示例11: onPictureInPictureModeChanged

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
public void onPictureInPictureModeChanged(boolean isInPictureInPictureMode, Configuration newConfig) {
    super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig);

    FrameLayout container = findViewById(R.id.local_video_view_container);
    SurfaceView surfaceView = (SurfaceView) container.getChildAt(0);

    surfaceView.setZOrderMediaOverlay(!isInPictureInPictureMode);
    surfaceView.setVisibility(isInPictureInPictureMode ? View.GONE : View.VISIBLE);
    container.setVisibility(isInPictureInPictureMode ? View.GONE : View.VISIBLE);
}
 
开发者ID:AgoraIO,项目名称:Agora-Picture-in-Picture-Android,代码行数:12,代码来源:VideoChatViewActivity.java

示例12: onCreate

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.help_activity);

    setupActivity();

    FrameLayout fl = (FrameLayout) findViewById(R.id.fragmentWebview2);
    fl.setVisibility(View.VISIBLE);
    APIWebviewFragment webViewFragment = new APIWebviewFragment();
    Bundle bundle = new Bundle();
    bundle.putString("url", "file:///android_asset/help.md.html"); // http://127.0.0.1:8585");
    webViewFragment.setArguments(bundle);
    addFragment(webViewFragment, R.id.fragmentWebview2, "qq");
}
 
开发者ID:victordiaz,项目名称:phonk,代码行数:16,代码来源:HelpActivity.java

示例13: showFileManagerDrawer

import android.widget.FrameLayout; //导入方法依赖的package包/类
/**
 * Show / hide file manager
 */
public void showFileManagerDrawer(boolean show) {
    FrameLayout fileManager = (FrameLayout) findViewById(R.id.fragmentFileManager);

    if (show) {
        fileManager.setVisibility(View.VISIBLE);
    } else {
        fileManager.setVisibility(View.GONE);
    }
}
 
开发者ID:victordiaz,项目名称:phonk,代码行数:13,代码来源:EditorActivity.java

示例14: onCreate

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.i(TAG, "onCreate");
    super.onCreate(savedInstanceState);
    setContentView(R.layout.login_activity);

    teacherService = new TeacherServiceImpl();
    teacherHelper = new TeacherHelper(getBaseContext());

    progressBar = (ProgressBar) findViewById(R.id.progressbar_login);
    screen = (FrameLayout) findViewById(R.id.white_screen_transparent);

    progressBar.setVisibility(View.INVISIBLE);
    screen.setVisibility(View.INVISIBLE);
}
 
开发者ID:inteliedoit,项目名称:thesis-project,代码行数:16,代码来源:LoginActivity.java

示例15: initViews

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void initViews() {
    // input bar
    messageActivityBottomLayout = (LinearLayout) view.findViewById(R.id.messageActivityBottomLayout);
    messageInputBar = view.findViewById(R.id.textMessageLayout);
    switchToTextButtonInInputBar = view.findViewById(R.id.buttonTextMessage);
    switchToAudioButtonInInputBar = view.findViewById(R.id.buttonAudioMessage);
    moreFuntionButtonInInputBar = view.findViewById(R.id.buttonMoreFuntionInText);
    emojiButtonInInputBar = view.findViewById(R.id.emoji_button);
    sendMessageButtonInInputBar = view.findViewById(R.id.buttonSendMessage);
    messageEditText = (EditText) view.findViewById(R.id.editTextMessage);

    // 语音
    audioRecordBtn = (Button) view.findViewById(R.id.audioRecord);
    audioAnimLayout = view.findViewById(R.id.layoutPlayAudio);
    time = (Chronometer) view.findViewById(R.id.timer);
    timerTip = (TextView) view.findViewById(R.id.timer_tip);
    timerTipContainer = (LinearLayout) view.findViewById(R.id.timer_tip_container);

    // 表情
    emoticonPickerView = (EmoticonPickerView) view.findViewById(R.id.emoticon_picker_view);

    // 显示录音按钮
    switchToTextButtonInInputBar.setVisibility(View.GONE);
    switchToAudioButtonInInputBar.setVisibility(View.VISIBLE);

    // 文本录音按钮切换布局
    textAudioSwitchLayout = (FrameLayout) view.findViewById(R.id.switchLayout);
    if (isTextAudioSwitchShow) {
        textAudioSwitchLayout.setVisibility(View.VISIBLE);
    } else {
        textAudioSwitchLayout.setVisibility(View.GONE);
    }
}
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:34,代码来源:InputPanel.java


注:本文中的android.widget.FrameLayout.setVisibility方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。