Install YouTrack on Linux
<YouTrack home directory>/bin
./youtrack.sh run --no-browser
./youtrack.sh start
References
https://www.jetbrains.com/help/youtrack/standalone/Install-YouTrack-ZIP-Installation.html
<YouTrack home directory>/bin
./youtrack.sh run --no-browser
./youtrack.sh start
References
https://www.jetbrains.com/help/youtrack/standalone/Install-YouTrack-ZIP-Installation.html
Yes but you’ll need to use Intent.ACTION_SEND_MULTIPLE instead of Intent.ACTION_SEND .
Intent intent = new Intent(); intent.setAction(Intent.ACTION_SEND_MULTIPLE); intent.putExtra(Intent.EXTRA_SUBJECT, "Here are some files."); intent.setType("image/jpeg"); /* This example is sharing jpeg images. */ ArrayList<Uri> files = new ArrayList<Uri>(); for(String path : filesToSend /* List of the files you want to send */) { File file = new File(path); Uri uri = Uri.fromFile(file); files.add(uri); } intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, files); startActivity(intent);
My Own Solution
private fun shareSelectedFiles() { val files = ArrayList<Uri>() CachePupli.selectedMediaList.forEach { s: String -> val uri = Uri.parse("file:///$s") files.add(uri) } val intent = Intent(Intent.ACTION_SEND_MULTIPLE) intent.setType(FileHelper().getMimeType(files.get(0).path)) intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, files) val clipData = ClipData.newUri(contentResolver, "Share", files.get(0)); if (files.size > 1) { var i = 1 while (i < files.size) { clipData.addItem(ClipData.Item(files.get(i))) i++ } } intent.clipData = clipData startActivityForResult(Intent.createChooser(intent, "Share"), 10001) } override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { // after sharing multiple files if (requestCode == 10001) { CachePupli.selectMediaMode = false EventBus.getDefault().post(ChangeSelectionModeStatusEvent(false)) } super.onActivityResult(requestCode, resultCode, data) }
References
https://stackoverflow.com/questions/15577438/how-can-i-share-multiple-files-via-an-intent
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/white" android:layoutDirection="rtl" android:orientation="vertical" android:textDirection="rtl"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingBottom="10dp" android:paddingEnd="40dp" android:paddingTop="10dp"> <android.support.v7.widget.AppCompatImageView android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginStart="4dp" app:srcCompat="@drawable/ic_share_gray_24dp" /> <android.support.v7.widget.AppCompatTextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="10dp" android:gravity="center_vertical" android:text="@string/share" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingBottom="10dp" android:paddingEnd="40dp" android:paddingTop="10dp"> <android.support.v7.widget.AppCompatImageView android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginStart="4dp" app:srcCompat="@drawable/ic_delete_gray_24dp" /> <android.support.v7.widget.AppCompatTextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="10dp" android:gravity="center_vertical" android:text="@string/delete" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:paddingBottom="10dp" android:paddingEnd="40dp" android:paddingTop="10dp"> <android.support.v7.widget.AppCompatImageView android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginStart="4dp" app:srcCompat="@drawable/ic_create_new_folder_gray_24dp" /> <android.support.v7.widget.AppCompatTextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="10dp" android:gravity="center_vertical" android:text="@string/move_to_folder" /> </LinearLayout> </LinearLayout>
fun imageButtonMoreVert_OnClick(v: View) { val view = layoutInflater.inflate(R.layout.gallery_selection_menu, null) val popup = PopupWindow(this) popup.contentView = view popup.setWidth(LinearLayout.LayoutParams.WRAP_CONTENT); popup.setHeight(LinearLayout.LayoutParams.WRAP_CONTENT); popup.setFocusable(true); val location = IntArray(2) imageButtonMoreVert.getLocationOnScreen(location) val p = Point(location.get(0), location.get(1)) val OFFSET_X = -20 val OFFSET_Y = 50 popup.showAtLocation(view, Gravity.NO_GRAVITY, p.x + OFFSET_X, p.y + OFFSET_Y); }
References
https://stackoverflow.com/questions/15454995/popupmenu-with-icons
https://androidresearch.wordpress.com/2012/05/06/how-to-create-popups-in-android/
Find your configuration files
Windows: %USERPROFILE%\.<CONFIGURATION_FOLDER>/ Mac: ~/Library/Preferences/<CONFIGURATION_FOLDER>/ Linux: ~/.<CONFIGURATION_FOLDER>/
File is located at “Android Studio Configuration folder”/config/options/jdk.table.xml
find javadocPath
... <jdk version="2"> <name value="Android API 25 Platform" /> <type value="Android SDK" /> <homePath value="$USER_HOME$/android-sdk" /> <roots> ... <javadocPath> <root type="composite"> <root type="simple" url="http://developer.android.com/reference/" /> </root> </javadocPath> ...
<root type="simple" url="file:///home/mauricio/android-sdk/docs/reference" /> <!-- if it's Windows --> <root type="simple" url="file://C:/android-sdk/docs/reference" />
References
https://stackoverflow.com/questions/42893969/how-to-use-android-sdk-documentation-offline
ActionBar actionBar; actionBar=getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: onBackPressed(); return true; } return super.onOptionsItemSelected(item); }
References
https://stackoverflow.com/questions/24032956/action-bar-back-button-not-working
recyclerView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { return true; } });
References
https://stackoverflow.com/questions/30531091/how-to-disable-recyclerview-scrolling
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) viewToLayout.getLayoutParams(); params.addRule(RelativeLayout.BELOW, R.id.below_id);
private fun cacheFiles(files: List<MediaFile>?) { if (files != null) { val measuredWidth = Statics.getScreenWidth() / 4 //val requestOption = RequestOptions.overrideOf(width, width) for (f in files) { if (f.mimeType.startsWith("image")) { GlideApp.with(CachePupli.context) .load(File(f.path)) .diskCacheStrategy(DiskCacheStrategy.ALL) .override(measuredWidth, measuredWidth) .centerCrop() .submit(measuredWidth, measuredWidth) } } } }
References
https://github.com/bumptech/glide/wiki/Loading-and-Caching-on-Background-Threads
android { defaultConfig { vectorDrawables.useSupportLibrary = true } } dependencies { compile 'com.android.support:appcompat-v7:23.2.0' }
References
https://developer.android.com/studio/write/vector-asset-studio.html
https://developer.android.com/guide/topics/graphics/vector-drawable-resources.html
http://inloop.github.io/svg2android/
https://github.com/BigBadaboom/androidsvg