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
| fun getActionBar(view: View?): ViewGroup? { | |
| try { | |
| if (view is ViewGroup) { | |
| if (view is Toolbar) { | |
| return view | |
| } | |
| for (i in 0 until view.childCount) { | |
| val actionBar = getActionBar(view.getChildAt(i)) | |
| if (actionBar != null) { | |
| return actionBar |
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
| <?php | |
| namespace App\Http\Controllers\Admin; | |
| use Backpack\CRUD\app\Http\Controllers\CrudController; | |
| //VALIDATION : change the request to match your own file names if you need from validation | |
| use App\Http\Requests\CategoryRequest as StoreRequest; | |
| use App\Http\Requests\CategoryRequest as UpdateRequest; | |
| /** | |
| * |
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
| <?php | |
| namespace App\Http\Controllers\Api; | |
| use Illuminate\Http\Request; | |
| use App\Http\Controllers\Controller; | |
| use App\Model\Articles; | |
| use App\Model\Users; | |
| use App\RequestResponse; |
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 id.diamondsleep.data.remoteapi | |
| import id.diamondsleep.data.mapper.BaseRemote | |
| import id.diamondsleep.data.source.dataarticle.articleremote.ArticleRemote | |
| import retrofit2.Response | |
| import retrofit2.http.GET | |
| import retrofit2.http.Path | |
| interface ArticleApi { |
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 id.diamondsleep.model; | |
| import com.google.gson.annotations.SerializedName; | |
| import java.util.List; | |
| /** | |
| * Created by Bayu WPP on 5/6/2017. | |
| */ |
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 class FireFighter extends Worker { | |
| @Override | |
| public void work() { | |
| super.work(); | |
| //..... | |
| } | |
| } |
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 id.diamondsleep.adapter; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.util.Log; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.ImageView; |
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 class ToastMatcher extends TypeSafeMatcher<Root> { | |
| @Override | |
| public void describeTo(Description description) { | |
| description.appendText("is toast"); | |
| } | |
| @Override | |
| public boolean matchesSafely(Root root) { | |
| int type = root.getWindowLayoutParams().get().type; |
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
| class MainActivity : AppCompatActivity() { | |
| val db = FirebaseFirestore.getInstance() | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_main) | |
| db.collection("users") | |
| .get() |
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
| class MainActivity : AppCompatActivity() { | |
| lateinit var exoPlayer: SimpleExoPlayer | |
| private var isPlaying = false | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_main) |
NewerOlder