360度全景展示
2017-09-07 10:37
239 查看
1.在build.gradle文件中添加依赖
2.在build.gradle文件添加库依赖
此时,你的build.gradle:
3.添加布局文件
4.传入你的全景图
运行即合理
allprojects { repositories { maven { url 'https://jitpack.io' } } }
2.在build.gradle文件添加库依赖
compile 'com.github.CN-ZPH:weibo360panorama:v1.0.1'
此时,你的build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.administrator.firstdemo1"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
allprojects { repositories { maven { url 'https://jitpack.io' } } }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.github.CN-ZPH:weibo360panorama:v1.0.1' compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
3.添加布局文件
<com.zph.glpanorama.GLPanorama android:id="@+id/mGLPanorama" android:layout_width="match_parent" android:layout_height="match_parent"> </com.zph.glpanorama.GLPanorama>
4.传入你的全景图
public class Main2Activity extends AppCompatActivity { private GLPanorama mGLPanorama; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main2); //初始化全景控件 mGLPanorama= (GLPanorama) findViewById(R.id.mGLPanorama); mGLPanorama.setGLPanorama(R.drawable.bbb); } }
运行即合理
相关文章推荐
- 点量源动闪媒Flash全景展示系统(可提供源码),提供360度全景展示
- 第15课时 360度全景图、QQ幻灯片、倒计时、放大镜效果、苹果官网产品展示
- 360度全景展示
- 谷歌VR展示360度全景图
- jQuery Panorama Viewer – 360度全景展示插件
- android 360度全景展示
- JavaScript实现360度全景图片展示效果
- Android 360度全景照片展示
- 360度全景展示插件
- 【精心挑选】推荐几款非常棒的 jQuery 全景图片展示插件
- 360度全景图
- HTML5 Canvas实现360度全景图
- 小赢科技参展金博会 VR全景展示金融科技
- Google Maps开始支持360度全景街道风光了
- 三维全景展示――震撼你的视觉
- 简单的全景展示利器panoramagl
- HTML5 Canvas实现360度全景图
- Google Maps开始支持360度全景街道风光了
- 原生Js封装的产品图片360度展示
- javascript如何实现360度全景照片问题汇总