git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
class SomeActivity : AppCompatActivity() { | |
private var timeChooserDialog: AlertDialog? = null | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
showDialog() | |
} | |
private fun showDialog() { |
class SomeFragment : Fragment() { | |
private var notesDialog: AlertDialog? = null | |
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
super.onViewCreated(view, savedInstanceState) | |
showDialog() | |
} | |
// showing dialog |
fun Any.showVLog(log: String) = Log.v(this::class.java.simpleName, log) | |
fun Any.showELog(log: String) = Log.e(this::class.java.simpleName, log) | |
fun Any.showDLog(log: String) = Log.d(this::class.java.simpleName, log) | |
fun Any.showILog(log: String) = Log.i(this::class.java.simpleName, log) | |
fun Any.showWLog(log: String) = Log.w(this::class.java.simpleName, log) |
<?xml version="1.0" encoding="utf-8"?> | |
<layout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<android.support.constraint.ConstraintLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@android:color/transparent"> | |
<ImageView |
import java.util.LinkedHashMap; | |
import java.util.Map; | |
import java.util.Set; | |
public class LinkedHashMapValueByIndexArray { | |
public static void main(String []args){ | |
LinkedHashMap<String, Integer> map = new LinkedHashMap<String, Integer>(); | |
map.put("Qatar", 98814); |
onAttach | |
onCreate | |
onCreateDialog | |
onCreateView | |
onActivityCreated | |
onStart | |
onResume |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
// API call from Android side | |
Observable.create<String> { emitter -> | |
try { | |
emitter.onNext(makeAMultiPartRequest(imageBytes, token)!!) | |
emitter.onComplete() | |
} catch (e: Exception) { | |
e.printStackTrace() | |
emitter.tryOnError(e) | |
} | |
}.compose(AppRxSchedulers.applySchedulers()) |
interface AppAPIs { | |
@Multipart | |
@POST(APIEndPoints.UPLOAD_PHOTO) | |
fun uploadTempProfilePic( | |
@Query(APIEndPoints.ID) | |
tempId: String, | |
@Part | |
image: MultipartBody.Part | |
): Flowable<PhotoUploadResponse> | |
} |
val lp = dialog?.window?.attributes | |
lp?.dimAmount = .8f | |
dialog?.window?.attributes = lp | |
dialog?.window?.addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND) |