Skip to content

Instantly share code, notes, and snippets.

Putu Guna griajobag

Block or report user

Report or block griajobag

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View SingleMediaScanner.java
package com.sangcomz.fishbun.util;
import android.content.Context;
import android.media.MediaScannerConnection;
import android.net.Uri;
import java.io.File;
public class SingleMediaScanner implements MediaScannerConnection.MediaScannerConnectionClient {
View kosong.json
{
"barang": [],
"status": 1,
"message": "Sukses"
}
View jsonke2.json
{
"barang": [
{
"id_barang": "11",
"nama_barang": "Tabung Gas",
"stok_barang": "56"
},
{
"id_barang": "12",
"nama_barang": "Tissue",
View HasilJson1.json
{
"barang": [
{
"id_barang": "1",
"nama_barang": "Timun",
"stok_barang": "2"
},
{
"id_barang": "2",
"nama_barang": "Kentang",
View ShowData.php
<?php
require_once "Connection.php";
class ShowData{
function getAllData(){
$connect = new Connection();
$con = $connect->getConnection();
//buatkan array untu jsonnya
$json_barang = array();
View Connection.php
<?php
class Connection{
function getConnection(){
$host = "localhost";
$username = "root";
$password = "";
$dbname = "pagination";
try{
View Manifest.xml
<uses-permission android:name="android.permission.INTERNET"/>
View ReviewActivity.java
package com.putuguna.ratinggoogleplaystore.reviews;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.os.Handler;
View PopulatingList.java
/**
* the method used to get all reviews in firebase firestore
* @param idProduct
*/
private void getAllReview(String idProduct) {
progressBar.setVisibility(View.VISIBLE);
rvReview.setVisibility(View.GONE);
CollectionReference collectionReference = firebaseFirestore.collection("product");
DocumentReference documentReference = collectionReference.document(idProduct);
documentReference.collection("review")
View RatingColor.java
/**
* This method used to display rating by colors
*
* @param productModel
*/
private void setRatingByColor(ProductModel productModel) {
int widthView = constrainLayout1.getWidth();
int totalAllVoters = productModel.getTotalVoters();
int totalRateStar1 = productModel.getStar1();
int totalRateStar2 = productModel.getStar2();
You can’t perform that action at this time.