This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { | |
File file=new File(mFilePath); | |
Uri uri = FileProvider.getUriForFile(this, getPackageName() + ".provider", file); | |
intent = new Intent(Intent.ACTION_VIEW); | |
intent.setData(uri); | |
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); | |
startActivity(intent); | |
} else { | |
intent = new Intent(Intent.ACTION_VIEW); | |
intent.setDataAndType(Uri.parse(mFilePath), "application/pdf"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gitHash = 'git rev-parse --short HEAD'.execute().text.trim() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class Repository( | |
var updated_on: String, | |
var tags: List<String>, | |
var description: String, | |
var user_id: List<Int>, | |
var status_id: Int, | |
var title: String, | |
var created_at: String, | |
var data: HashMap<*, *>, | |
var id: Int, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static boolean isSafeFragment( Fragment frag ) | |
{ | |
return !(frag.isRemoving() || frag.getActivity() == null || frag.isDetached() || !frag.isAdded() || frag.getView() == null ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
recyclerView.addOnScrollListener( | |
new RecyclerView.OnScrollListener() { | |
@Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { | |
super.onScrolled(recyclerView, dx, dy); | |
if (isLastItemDisplaying(recyclerView)) { | |
//Calling the method getdata again getData(); | |
} | |
} | |
} | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.alexjlockwood.playingwithpaths | |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.compose.animation.animatedFloat | |
import androidx.compose.animation.core.AnimationConstants | |
import androidx.compose.animation.core.LinearEasing | |
import androidx.compose.animation.core.repeatable | |
import androidx.compose.animation.core.tween | |
import androidx.compose.foundation.Image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.monpfe | |
import android.app.ProgressDialog | |
import android.content.Intent | |
import android.os.Bundle | |
import android.text.TextUtils | |
import android.util.Log | |
import android.widget.Button | |
import android.widget.EditText |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<receiver android:name=".CallReceiver" > | |
<intent-filter> | |
<action android:name="android.intent.action.PHONE_STATE" /> | |
</intent-filter> | |
<intent-filter> | |
<action android:name="android.intent.action.NEW_OUTGOING_CALL" /> | |
</intent-filter> | |
</receiver> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Copyright (C) 2017 The Android Open Source Project | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
NewerOlder