Android Open Source - GlassTunes Browse Card From Project Back to project page GlassTunes .
License The source code is released under:
Apache License
If you think the Android project GlassTunes listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code package com.glasstunes.cards;
/ * w w w . j a v a 2 s . c o m * /
import java.net.URISyntaxException;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import com.glasstunes.screenslide.BasicCardFragment;
public class BrowseCard extends BasicCardFragment {
protected static final String ARG_INTENT_URI = null;
protected static Bundle generateArgs(String display_name, String intent_uri) {
Bundle args = BasicCardFragment.generateArgs(0, display_name);
args.putString(ARG_INTENT_URI, intent_uri);
return args;
}
public static BrowseCard newInstance(String display_name, String intent_uri) {
BrowseCard frag = new BrowseCard();
Bundle args = generateArgs(display_name, intent_uri);
frag.setArguments(args);
return frag;
}
protected Intent mIntent;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle args = savedInstanceState == null ? getArguments()
: savedInstanceState;
try {
mIntent = Intent.parseUri(args.getString(ARG_INTENT_URI), 0);
} catch (URISyntaxException e) {
e.printStackTrace();
}
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putString(ARG_INTENT_URI,
mIntent.toUri(Intent.URI_INTENT_SCHEME));
}
@Override
public void onSelect() {
super.onSelect();
startActivityForResult(mIntent, 0);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
getActivity().setResult(resultCode);
if (resultCode == Activity.RESULT_OK) {
getActivity().finish();
}
}
}
Java Source Code List com.glasstunes.BaseContentCardActivity.java com.glasstunes.BrowseActivity.java com.glasstunes.ConfirmationActivity.java com.glasstunes.ControlsActivity.java com.glasstunes.Debug.java com.glasstunes.DetailActivity.java com.glasstunes.GlassTunesApp.java com.glasstunes.HeaderActivity.java com.glasstunes.LauncherActivity.java com.glasstunes.NowPlayingActivity.java com.glasstunes.cards.ActionCard.java com.glasstunes.cards.BrowseCard.java com.glasstunes.cards.ContentCard.java com.glasstunes.cards.HeaderCard.java com.glasstunes.cards.LauncherCard.java com.glasstunes.cards.NowPlayingCard.java com.glasstunes.cards.PausePlayCard.java com.glasstunes.cards.SkipNextCard.java com.glasstunes.cards.SkipPreviousCard.java com.glasstunes.controller.LocalMusicController.java com.glasstunes.controller.MusicController.java com.glasstunes.screenslide.BasicCardFragment.java com.glasstunes.screenslide.BasicCardPagerAdapter.java com.glasstunes.screenslide.BounceBackViewPager.java com.glasstunes.screenslide.CardFragment.java com.glasstunes.screenslide.ContextWrapperEdgeEffect.java com.glasstunes.screenslide.ScreenSlideActivity.java com.glasstunes.screenslide.ScreenSlidePagerAdapter.java com.glasstunes.view.RobotoTypefaces.java com.glasstunes.view.SliderView.java com.glasstunes.view.TypophileTextView.java com.viewpagerindicator.CirclePageIndicator.java com.viewpagerindicator.IconPageIndicator.java com.viewpagerindicator.IconPagerAdapter.java com.viewpagerindicator.IcsLinearLayout.java com.viewpagerindicator.LinePageIndicator.java com.viewpagerindicator.PageIndicator.java com.viewpagerindicator.TabPageIndicator.java com.viewpagerindicator.TitlePageIndicator.java com.viewpagerindicator.UnderlinePageIndicator.java com.woodblockwithoutco.remotemetadataprovider.internal.MetadataUpdaterCallback.java com.woodblockwithoutco.remotemetadataprovider.internal.RemoteControlDisplay.java com.woodblockwithoutco.remotemetadataprovider.media.RemoteMetadataProvider.java com.woodblockwithoutco.remotemetadataprovider.media.enums.MediaCommand.java com.woodblockwithoutco.remotemetadataprovider.media.enums.PlayState.java com.woodblockwithoutco.remotemetadataprovider.media.enums.RemoteControlFeature.java com.woodblockwithoutco.remotemetadataprovider.media.listeners.OnArtworkChangeListener.java com.woodblockwithoutco.remotemetadataprovider.media.listeners.OnMetadataChangeListener.java com.woodblockwithoutco.remotemetadataprovider.media.listeners.OnPlaybackStateChangeListener.java com.woodblockwithoutco.remotemetadataprovider.media.listeners.OnRemoteControlFeaturesChangeListener.java