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


Java ViewSwitcher.showNext方法代码示例

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


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

示例1: listSelected

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
private void listSelected(ListDesc list, boolean animate)
{
    //Log.v(L.TAG, "SimplyDoActivity.listSelected() called on list " + list.getId());
    
    setTitle(list.getLabel());
    
    dataViewer.setSelectedList(list);
    itemListSorter.sort(dataViewer.getItemData());
    itemPropertiesAdapter.notifyDataSetChanged();
    
    ViewSwitcher viewSwitch = (ViewSwitcher)findViewById(R.id.ListsItemsSwitcher);
    
    if(animate)
    {
        viewSwitch.showNext();
    }
    else
    {
        viewSwitch.reset();
        viewSwitch.setAnimateFirstView(false);
        viewSwitch.setDisplayedChild(1);
    }
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:24,代码来源:SimplyDoActivity.java

示例2: renameFlow

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
/**
 * Hides the Options Menu and uses a ViewSwitcher to quick turn the exisiting TextView with the
 * Flow's name into an EditText for the user to rename.
 *
 * @param cardPosition position of cardview in adapter
 * @param cardViewClicked the cardview view object clicked
 */
private void renameFlow(final int cardPosition, final View cardViewClicked) {
    menuState = AppConstants.MENU_ITEMS_HIDE;
    invalidateOptionsMenu();
    final ViewSwitcher switcher = (ViewSwitcher) cardViewClicked.findViewById(R.id.hub_rename_switcher);
    final EditText rename = (EditText) switcher.findViewById(R.id.hub_item_flow_rename);

    AppUtils.setNameInputFilters(rename);

    rename.setOnFocusChangeListener(new View.OnFocusChangeListener() {
        @Override
        public void onFocusChange(View v, boolean hasFocus) {
            if (rename.hasFocus()) {
                showEditPopupWindow(rename, cardViewClicked, switcher, cardPosition);
            }
        }
    });

    switcher.showNext();

    rename.requestFocus();
    /* Forces keyboard */


}
 
开发者ID:robertsimoes,项目名称:Flow,代码行数:32,代码来源:TheHubActivity.java

示例3: renameFlow

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
/**
 * Hides the Options Menu and uses a ViewSwitcher to quick turn the exisiting TextView with the
 * Flow's name into an EditText for the user to rename.
 *
 * @param cardPosition position of cardview in adapter
 * @param cardViewClicked the cardview view object clicked
 */
private void renameFlow(final int cardPosition, final View cardViewClicked) {
    menuState = AppConstants.MENU_ITEMS_HIDE;
    invalidateOptionsMenu();
    final ViewSwitcher switcher = (ViewSwitcher) cardViewClicked.findViewById(R.id.hub_rename_switcher);
    final EditText rename = (EditText) switcher.findViewById(R.id.hub_item_flow_rename);

    AppUtils.setNameInputFilters(rename);

    rename.setOnFocusChangeListener(new View.OnFocusChangeListener() {
        @RequiresApi(api = Build.VERSION_CODES.KITKAT)
        @Override
        public void onFocusChange(View v, boolean hasFocus) {
            if (rename.hasFocus()) {
                showEditPopupWindow(rename, cardViewClicked, switcher, cardPosition);
            }
        }
    });

    switcher.showNext();

    rename.requestFocus();
    /* Forces keyboard */


}
 
开发者ID:tortuvshin,项目名称:yield,代码行数:33,代码来源:TheHubActivity.java

示例4: editListName

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
@Override
public void editListName(View _View, ShoppingList _ShoppingList, ViewSwitcher _ViewSwitcher) {
    ImageView cancelView;
    ImageView submitView;
    EditText editText;
    cancelView = (ImageView) _View.findViewById(R.id.expandable_list_view_edit_cancel);
    submitView = (ImageView) _View.findViewById(R.id.expandable_list_view_edit_submit);

    editText = (EditText) _View.findViewById(R.id.expandable_list_view_list_edit_name);

    cancelView.setOnClickListener(new OnCancelClickListenerWithData(_ViewSwitcher));
    submitView.setOnClickListener(new OnSubmitClickListenerWithChildData(mContext, _ViewSwitcher,
            editText, _ShoppingList.mUUID));

    editText.setText(_ShoppingList.mName);
    _ViewSwitcher.showNext();
}
 
开发者ID:InstaList,项目名称:instalist-android,代码行数:18,代码来源:ContextItemClickedHelper.java

示例5: setContent

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
public void setContent(Fragment content) {
    Fragment last = mCurrentContent;
    mCurrentContent = content;
    FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction();
    if (last != null)
        ft.replace(R.id.content, mCurrentContent);
    else
        ft.add(R.id.content, mCurrentContent);
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
    if (mContainer instanceof ViewSwitcher) {
        ViewSwitcher switcher = (ViewSwitcher)mContainer;
        if (mContent != switcher.getCurrentView())
            switcher.showNext();
    }
    ft.commit();
}
 
开发者ID:W2Cypher,项目名称:LiIonSaver,代码行数:17,代码来源:ListContentFragment.java

示例6: switchersShowNext

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
private void switchersShowNext() {
    ViewSwitcher switcherName = (ViewSwitcher) getView().findViewById(R.id.fragment_se_switcher_name);
    ViewSwitcher switcherTime = (ViewSwitcher) getView().findViewById(R.id.fragment_se_switcher_time);
    ViewSwitcher switcherNotes = (ViewSwitcher) getView().findViewById(R.id.fragment_se_switcher_notes);
    switcherName.showNext();
    switcherTime.showNext();
    switcherNotes.showNext();
}
 
开发者ID:robertsimoes,项目名称:Flow,代码行数:9,代码来源:ShowElementFragment.java

示例7: showFirstStart

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
private void showFirstStart() {
    stopRefreshAnimation();
    LayoutInflater inflater = LayoutInflater.from(getActivity());
    ViewGroup parent = (ViewGroup) ((ViewGroup) getActivity().findViewById(R.id.scrollview)).getChildAt(0);
    if (parent.findViewById(R.id.tracks_msg) == null)
        inflater.inflate(R.layout.no_tracks, parent);

    TypedValue typedValue = new TypedValue();
    getActivity().getTheme().resolveAttribute(R.attr.firstLaunchCoverDrawable, typedValue, true);
    int firstLaunchBGid = typedValue.resourceId;
    @SuppressWarnings("deprecation")
    BitmapDrawable bd = ((BitmapDrawable) getResources().getDrawable(firstLaunchBGid));

    SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getActivity());

    setCoverArt(bd != null ? bd.getBitmap() : null, null, true);
    ViewSwitcher viewSwitcher = getActivity().findViewById(R.id.switcher);
    if (viewSwitcher.getChildCount() > 1)
        viewSwitcher.removeViewAt(0);
    viewSwitcher.addView(new View(getActivity()));
    viewSwitcher.showNext();

    int themeNum = Integer.valueOf(sharedPref.getString("pref_theme", "0"));
    if (themeNum > 0 && themeNum != 7) {
        TypedValue darkColorValue = new TypedValue();
        getActivity().getTheme().resolveAttribute(R.attr.colorPrimaryDark, darkColorValue, true);
        ((FadeInNetworkImageView) getActivity().findViewById(R.id.cover))
                .setColorFilter(darkColorValue.data, PorterDuff.Mode.OVERLAY);
    }

    getActivity().findViewById(R.id.error_msg).setVisibility(View.INVISIBLE);
    ((TextView) getActivity().findViewById(R.id.artist)).setText("");
    ((TextView) getActivity().findViewById(R.id.song)).setText("");
    getActivity().findViewById(R.id.top_gradient).setVisibility(View.INVISIBLE);
    getActivity().findViewById(R.id.bottom_gradient).setVisibility(View.INVISIBLE);
    getActivity().findViewById(R.id.edit_tags_btn).setVisibility(View.INVISIBLE);
}
 
开发者ID:QuickLyric,项目名称:QuickLyric,代码行数:38,代码来源:LyricsViewFragment.java

示例8: onCreate

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

	setContentView(R.layout.request_grid);
	switcherLoad = (ViewSwitcher)findViewById(R.id.viewSwitcherLoadingMain);
	context = this;

	getActionBar().setDisplayHomeAsUpEnabled(true);

	if(savedInstanceState == null){

		//Loading Logo Animation
		ImageView logo = (ImageView)findViewById(R.id.imageViewLogo);
		ObjectAnimator logoAni = (ObjectAnimator)AnimatorInflater.loadAnimator(context, R.animator.request_flip);
		logoAni.setRepeatCount(Animation.INFINITE);
		logoAni.setRepeatMode(Animation.RESTART);
		logoAni.setTarget(logo);
		logoAni.setDuration(2000);
		logoAni.start();

		taskList.execute();
	}
	else 
	{
		populateView(list_activities_final);
		switcherLoad.showNext();
	}
}
 
开发者ID:numixproject,项目名称:org.numixproject.iconsubmit,代码行数:30,代码来源:RequestActivity.java

示例9: onObjectUpdated

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
public void onObjectUpdated() {
    Log.i(TAG, "Object " + m_id + " updated");

    View rootView = getView();
    if(rootView != null) {
        ViewSwitcher sw = (ViewSwitcher) getView().findViewById(R.id.switcher);
        if(m_child != null) {
            if(sw.getCurrentView().getId() != R.id.objectDisplayFragment)
                sw.showNext();

            // Notify the child
            m_child.objectUpdated(m_object);
            return;
        }

        // Construct the child fragment
        ObjectFragment frag = null;
        if(m_object == null) {
            frag = new NullObjectFragment();
        } else if("person".equals(m_object.optString("objectType"))) {
            frag = new PersonObjectFragment();
        } else {
            frag = new StandardObjectFragment();
        }

        FragmentManager mgr = getChildFragmentManager();
        m_child = ObjectFragment.prepare(frag, m_id, m_intId);

        mgr.beginTransaction()
                .add(R.id.objectDisplayFragment, m_child)
                .commit();

        sw.showNext();
    } else {
        // Nothing to do - our UI hasn't yet been created
        // We will update when we have a child
    }
}
 
开发者ID:erincandescent,项目名称:Impeller,代码行数:39,代码来源:ObjectContainerFragment.java

示例10: do_flip

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
public void do_flip (View view)
{
	ViewSwitcher vs_buttonrow = (ViewSwitcher) findViewById(R.id.vs_buttonrow);
	vs_buttonrow.showNext();
	ViewSwitcher vs_cardsides = (ViewSwitcher) findViewById(R.id.vs_cardsides);
	vs_cardsides.showNext();
}
 
开发者ID:jcuenod,项目名称:brainrot,代码行数:8,代码来源:MainActivity.java

示例11: editUserName

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
public void editUserName(View v) {
    ViewSwitcher switcher = (ViewSwitcher) findViewById(R.id.username_switcher);
    switcher.showNext();

    editUserName(switcher.getDisplayedChild() == 1);
}
 
开发者ID:Gchorba,项目名称:NickleAndDimed,代码行数:7,代码来源:EventDetails.java

示例12: onCreateView

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
        ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_add_note, container, false);

        notePreview = (TextView) rootView.findViewById(R.id.add_note_preview);
//		ViewGroup.LayoutParams maxParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
//		noteEdit = new EditText(getActivity());
//		notePreview = new EditText(getActivity());
//		noteEdit.setLayoutParams(maxParams);
//		notePreview.setLayoutParams(maxParams);
//		notePreview.setClickable(true);
//		notePreview.setOnClickListener(this);
//		noteEdit.setId(R.id.note_view_edit);
//		notePreview.setId(R.id.note_view_preview);
        noteEdit = (EditText) rootView.findViewById(R.id.add_note_edit);
        noteDate = (TextView) rootView.findViewById(R.id.add_note_date);

		fillFromNote(shownNote);

		switcher = (ViewSwitcher) rootView.findViewById(R.id.switcher);
//		switcher.addView(noteEdit);
//		switcher.addView(notePreview);

		if(viewType == TYPE_PREVIEW)
		{
//			switcher.showPrevious();
		}
		else
		{
			switcher.showNext();
		}

		activityCommunicator.onMessage(REQUEST_CHANGE_TYPE, viewType);

        notePreview.setText(shownNote.getContent());

        if(Utils.isDateToday(shownNote.getLastModified()))
        {
            noteDate.setText(
                    getString(R.string.today_capital)
            );
        }
        else if(Utils.isDateToday(shownNote.getLastModified()))
        {
            noteDate.setText(
                    getString(R.string.yesterday_capital)
            );
        }
        else
        {
            Date lastModifiedDate = new Date((long)shownNote.getLastModified()*1000);
            Calendar lastModifiedCalendar = Calendar.getInstance();
            lastModifiedCalendar.setTime(lastModifiedDate);

                SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, MMM d, yyyy HH:mm");
                noteDate.setText(
                        dateFormat.format(new Date(((long)shownNote.getLastModified()*1000))));
        }

        return rootView;
    }
 
开发者ID:oguzbilgener,项目名称:tuo-android,代码行数:63,代码来源:ViewNoteFragment.java

示例13: updateList

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
public void updateList() {
    progressContainer = findViewById(R.id.progress_bar_container);
    progressBar = (ProgressBar)findViewById(R.id.analyze_progress);
    progressContainer.setVisibility(View.GONE);

    loadText = (TextView) findViewById(R.id.load_text);

    TextView stopScan = (TextView) findViewById(R.id.stop_scan);
    Typeface font = Typeface.createFromAsset(getAssets(), "fontawesome-webfont.ttf");
    stopScan.setTypeface(font);
    stopScan.setClickable(true);
    stopScan.setOnClickListener(this);

    startScan = (Button) findViewById(R.id.start_scan);
    startScan.setOnClickListener(this);

    ViewSwitcher switcher = (ViewSwitcher)findViewById(R.id.switcher);
    ViewSwitcher switcher_list = (ViewSwitcher)findViewById(R.id.switcher_list);

    Context context = getApplicationContext();
    File path = context.getDatabasePath("contactsgraph");
    File modelFile = new File(path, "model.kryo.gz");

    if (path.exists() && modelFile.exists()) {
        this.adapter.update();
        while (switcher.getCurrentView().getId() != R.id.switcher_list) {
            switcher.showNext();
        }
        if (adapter.getCount() == 0) {
            while (switcher_list.getCurrentView().getId() != R.id.all_done) {
                switcher_list.showNext();
            }
        } else {
            while (switcher_list.getCurrentView().getId() != R.id.contact_merge_list) {
                switcher_list.showPrevious();
            }
        }
        switcher_list.postInvalidate();
    } else {
        if (switcher.getCurrentView().getId() == R.id.contact_merge_list) {
            switcher.showPrevious();
        }
        Intent intent = new Intent(getApplicationContext(), AnalyzerService.class);
        intent.putExtra("forceRunning", true);
        startService(intent);
    }
    switcher.postInvalidate();
}
 
开发者ID:rtreffer,项目名称:ContactMerger,代码行数:49,代码来源:MergeActivity.java


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