use of com.applozic.mobicomkit.uiwidgets.conversation.TouchImageView in project Applozic-Android-SDK by AppLozic.
the class FullScreenImageActivity method onCreate.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mobicom_image_full_screen);
Toolbar toolbar = (Toolbar) findViewById(R.id.my_toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().show();
showUi();
mediaImageViewView = (TouchImageView) findViewById(R.id.full_screen_image);
ProgressBar progressBar = (ProgressBar) findViewById(R.id.full_screen_progress_bar);
progressBar.setVisibility(View.VISIBLE);
String messageJson = getIntent().getStringExtra(MobiComKitConstants.MESSAGE_JSON_INTENT);
if (!TextUtils.isEmpty(messageJson)) {
message = (Message) GsonUtils.getObjectFromJson(messageJson, Message.class);
}
if (message != null && message.getFilePaths() != null && !message.getFilePaths().isEmpty()) {
try {
Bitmap imageBitmap = ImageUtils.decodeSampledBitmapFromPath(message.getFilePaths().get(0));
mediaImageViewView.setImageBitmap(imageBitmap);
} catch (Exception e) {
e.printStackTrace();
}
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
getWindow().getDecorView().setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() {
@Override
public void onSystemUiVisibilityChange(int visibility) {
if (visibility == 0) {
getSupportActionBar().show();
}
}
});
}
progressBar.setVisibility(View.GONE);
connectivityReceiver = new ConnectivityReceiver();
registerReceiver(connectivityReceiver, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
}
Aggregations