![JAR search and dependency download from the Maven repository](/logo.png)
src.com.example.photoviewersample.MainActivity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of android-all Show documentation
Show all versions of android-all Show documentation
A library jar that provides APIs for Applications written for the Google Android Platform.
package com.example.photoviewersample;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import com.android.ex.photo.Intents;
import com.android.ex.photo.Intents.PhotoViewIntentBuilder;
public class MainActivity extends Activity implements OnClickListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
View b = findViewById(R.id.button);
b.setOnClickListener(this);
}
@Override
public void onClick(View v) {
final PhotoViewIntentBuilder builder =
Intents.newPhotoViewActivityIntentBuilder(this);
builder
.setPhotosUri("content://com.example.photoviewersample.SampleProvider/photos");
startActivity(builder.build());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy