View activity_create_post.xml
<ImageView
android:id="@+id/videoImageView"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
android:scaleType="centerCrop"
android:src="@drawable/ic_video_filled"
android:background="@drawable/bg_round_rect_blue"/>
View CreatePostActivity.kt
private fun setVideoThumbnail(thumbnail: Bitmap) {
pictureImageView.visibility = View.GONE
videoImageView.setImageBitmap(thumbnail)
videoPlayImageView.visibility = View.VISIBLE
cancelImageView.visibility = View.VISIBLE
checkPostingEnabled()
}
View BaseActivity.kt
open protected fun chooseFromGallery(videoEnabled: Boolean = false) {
canChooseVideo = videoEnabled
getPermissionHelper().requestGalleryPermission(GALERY_REQUEST) {
with(Intent(
Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI)) {
type = "video/*"
putExtra(Intent.EXTRA_LOCAL_ONLY, true)
startActivityForResult(this, GALLERY)
}
View Utils.java
public static String getAbsolutePathForVideoFromURI(@NonNull Context context, @NonNull Uri videoUri) {
if (ContentResolver.SCHEME_FILE.equals(videoUri.getScheme())) {
return videoUri.getPath();
} else if ("com.google.android.apps.photos.contentprovider".equals(videoUri.getAuthority())) {
String pathUri = videoUri.getPath();
videoUri = Uri.parse(pathUri.substring(pathUri.indexOf("content"), pathUri.lastIndexOf("/ORIGINAL")));
}
String id = getUriId(videoUri);
View gist:47e32f2458dcbccdc9b8e60e673eef67
------------------------
COMMAND : ADDFRIEND ahmet zeki
Error: Please sign in and try again.
------------------------
COMMAND : ADDFRIEND ahmet selman
Error: Please sign in and try again.
------------------------
COMMAND : ADDFRIEND ahmet murat
Error: Please sign in and try again.
------------------------
View gist:f80fdda0c496d6efa0d26fd85efe417a
Public void addToCart(Item i){
if (SoppingCart == null)
ShoppingCart = new ArrayList<Item>();
ShoppingCart.add(i)
}
View gist:5d6a63fc75b887c6625931a3583d0eeb
InternationCustomer ic =new InternationCustomer(Integer.parseInt(st1.nextToken()), st1.nextToken(), st1.nextToken());
customer1[customerSay] = ic;
View gist:8229539258a0198ad25a294775203e92
package project1;
public class NationalCustomer extends Customer{
private int LicensePlateNumber;
private String Occupation;
public NationalCustomer() {
View gist:6a1aff78be13079847c4fd1a23472266
package project1;
public class InternationalCustomer extends Customer {
private String Country;
private String City;
public InternationalCustomer(){
View gist:f6c80f374bab2767c019900a9834f72c
package project1;
public class Customer {
private int CustomerID;
private String Name;
private String Surname;