本文整理汇总了Java中com.google.vr.sdk.widgets.pano.VrPanoramaView类的典型用法代码示例。如果您正苦于以下问题:Java VrPanoramaView类的具体用法?Java VrPanoramaView怎么用?Java VrPanoramaView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VrPanoramaView类属于com.google.vr.sdk.widgets.pano包,在下文中一共展示了VrPanoramaView类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initPanoView
import com.google.vr.sdk.widgets.pano.VrPanoramaView; //导入依赖的package包/类
private void initPanoView() {
vrPano = (VrPanoramaView) findViewById(R.id.vr_pano);
loading = findViewById(R.id.pb_loading);
Intent intent = getIntent();
String url = intent.getStringExtra("url");
String mp3 = intent.getStringExtra("mp3");
initPlayer(mp3);
OkGo.get(url).cacheKey(url).execute(new BitmapCallback() {
@Override
public void onSuccess(Bitmap bitmap, Call call, Response response) {
loading.setVisibility(View.GONE);
VrPanoramaView.Options options = new VrPanoramaView.Options();
options.inputType = VrPanoramaView.Options.TYPE_MONO;
vrPano.loadImageFromBitmap(bitmap, options);
}
});
}
开发者ID:JackChan1999,项目名称:GoogleVR,代码行数:20,代码来源:ImageDetailActivity.java
示例2: loadPanoImage
import com.google.vr.sdk.widgets.pano.VrPanoramaView; //导入依赖的package包/类
private synchronized void loadPanoImage() {
ImageLoaderTask task = backgroundImageLoaderTask;
if (task != null && !task.isCancelled()) {
// Cancel any task from a previous loading.
task.cancel(true);
}
// pass in the name of the image to load from assets.
VrPanoramaView.Options viewOptions = new VrPanoramaView.Options();
viewOptions.inputType = VrPanoramaView.Options.TYPE_STEREO_OVER_UNDER;
// use the name of the image in the assets/ directory.
String panoImageName = "converted.jpg";
// create the task passing the widget view and call execute to start.
task = new ImageLoaderTask(panoWidgetView, viewOptions, panoImageName);
task.execute(getAssets());
backgroundImageLoaderTask = task;
}
开发者ID:jonathanandrade10,项目名称:vrview-sample,代码行数:20,代码来源:MainActivity.java
示例3: loadPanoImage
import com.google.vr.sdk.widgets.pano.VrPanoramaView; //导入依赖的package包/类
private synchronized void loadPanoImage() {
ImageLoaderTask task = backgroundImageLoaderTask;
if (task != null && !task.isCancelled()) {
// Cancel any task from a previous loading.
task.cancel(true);
}
// pass in the name of the image to load from assets.
VrPanoramaView.Options viewOptions = new VrPanoramaView.Options();
viewOptions.inputType = VrPanoramaView.Options.TYPE_STEREO_OVER_UNDER;
// use the name of the image in the assets/ directory.
String panoImageName = "converted.jpg";
// create the task passing the widget view and call execute to start.
task = new ImageLoaderTask(panoWidgetView, viewOptions, panoImageName);
task.execute(getActivity().getAssets());
backgroundImageLoaderTask = task;
}
开发者ID:JayFang1993,项目名称:gvrdemo-codelabs,代码行数:20,代码来源:WelcomeFragment.java
示例4: onCreate
import com.google.vr.sdk.widgets.pano.VrPanoramaView; //导入依赖的package包/类
/**
* Called when the app is launched via the app icon or an intent using the adb command above. This
* initializes the app and loads the image to render.
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_layout);
// Make the source link clickable.
TextView sourceText = (TextView) findViewById(R.id.source);
sourceText.setText(Html.fromHtml(getString(R.string.source)));
sourceText.setMovementMethod(LinkMovementMethod.getInstance());
panoWidgetView = (VrPanoramaView) findViewById(R.id.pano_view);
panoWidgetView.setEventListener(new ActivityEventListener());
// Initial launch of the app or an Activity recreation due to rotation.
handleIntent(getIntent());
}
开发者ID:codedavid,项目名称:PanoramaGL,代码行数:21,代码来源:SimpleVrPanoramaActivity.java
示例5: onPostExecute
import com.google.vr.sdk.widgets.pano.VrPanoramaView; //导入依赖的package包/类
@Override
protected void onPostExecute(Bitmap bitmap) {
final VrPanoramaView vw = viewReference.get();
if (vw != null && bitmap != null) {
vw.loadImageFromBitmap(bitmap, viewOptions);
}
}
开发者ID:jonathanandrade10,项目名称:vrview-sample,代码行数:8,代码来源:ImageLoaderTask.java
示例6: onCreate
import com.google.vr.sdk.widgets.pano.VrPanoramaView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
panoWidgetView = (VrPanoramaView) findViewById(R.id.vr_view);
//loadPanoImage();
loadPanoImage();
}
开发者ID:jonathanandrade10,项目名称:vrview-sample,代码行数:9,代码来源:MainActivity.java
示例7: onAfterUpdateTransaction
import com.google.vr.sdk.widgets.pano.VrPanoramaView; //导入依赖的package包/类
public void onAfterUpdateTransaction() {
panoWidgetView = new VrPanoramaView(_activity);
panoWidgetView.setEventListener(new ActivityEventListener());
panoWidgetView.setStereoModeButtonEnabled(false);
panoWidgetView.setInfoButtonEnabled(false);
panoWidgetView.setFullscreenButtonEnabled(false);
this.addView(panoWidgetView);
if (imageLoaderTask != null) {
imageLoaderTask.cancel(true);
}
imageLoaderTask = new ImageLoaderTask();
imageLoaderTask.execute(Pair.create(imageUrl, panoOptions));
}
开发者ID:XebiaStudio,项目名称:react-native-google-vr-panorama,代码行数:15,代码来源:RNGoogleVRPanoramaView.java
示例8: onCreateView
import com.google.vr.sdk.widgets.pano.VrPanoramaView; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.welcome_fragment, container,false);
panoWidgetView = (VrPanoramaView) v.findViewById(R.id.pano_view);
loadPanoImage();
return v;
}
开发者ID:JayFang1993,项目名称:gvrdemo-codelabs,代码行数:10,代码来源:WelcomeFragment.java
示例9: createPanoramaView
import com.google.vr.sdk.widgets.pano.VrPanoramaView; //导入依赖的package包/类
@NonNull private VrPanoramaView createPanoramaView() {
final VrPanoramaView sphere = new VrPanoramaView(getContext());
final int widthInPixel = getContext().getResources().getDimensionPixelSize(R.dimen.panorama_preview_width);
final int heightInPixel = getContext().getResources().getDimensionPixelSize(R.dimen.panorama_preview_height);
final FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(widthInPixel, heightInPixel);
sphere.setLayoutParams(layoutParams);
sphere.setInfoButtonEnabled(false);
sphere.setStereoModeButtonEnabled(true);
return sphere;
}
开发者ID:gdg-berlin-android,项目名称:gdg-events-app,代码行数:14,代码来源:EventLayout.java
示例10: ImageLoaderTask
import com.google.vr.sdk.widgets.pano.VrPanoramaView; //导入依赖的package包/类
public ImageLoaderTask(VrPanoramaView view, VrPanoramaView.Options viewOptions, String assetName) {
viewReference = new WeakReference<>(view);
this.viewOptions = viewOptions;
this.assetName = assetName;
}
开发者ID:jonathanandrade10,项目名称:vrview-sample,代码行数:6,代码来源:ImageLoaderTask.java
示例11: ImageLoader
import com.google.vr.sdk.widgets.pano.VrPanoramaView; //导入依赖的package包/类
public ImageLoader(VrPanoramaView view, VrPanoramaView.Options viewOptions, String assetName) {
viewReference = new WeakReference<>(view);
this.viewOptions = viewOptions;
this.assetName = assetName;
}
开发者ID:jonathanandrade10,项目名称:vrview-sample,代码行数:6,代码来源:ImageLoader.java
注:本文中的com.google.vr.sdk.widgets.pano.VrPanoramaView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论