This file contains 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.durbinlabs.duplate.common.utils; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.support.design.widget.CoordinatorLayout; | |
import android.support.v7.widget.Toolbar; | |
import android.util.AttributeSet; | |
import android.view.View; | |
This file contains 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
private int imageHeight, imageWidth, w; | |
private ImageView imageSingleFoodItem; | |
onCreate() { | |
// w = (int) (getScreenWidth(this) * 0.80); | |
w = (int) (getScreenWidth(this)); | |
//drawable image and you want that size you can get like this way | |
BitmapFactory.Options options = new BitmapFactory.Options(); |
This file contains 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 void addAll(ArrayList<Inventory> newList) { | |
// Lg.i(TAG, "Adding all: Current count=" + c + ", \nNew count=" + newList.size()); | |
//Previous List of Recycler View | |
List<Inventory> itemList = this.itemList; | |
for (Inventory iv : newList) { | |
boolean exists = false; | |
// id of new list | |
int id = iv.getId(); | |
for (Inventory ivOld : itemList) | |
// checking new id with old id |
This file contains 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.durbinlabs.duplate.fragments; | |
import android.location.Address; | |
import android.location.Geocoder; | |
import android.support.v4.app.Fragment; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; |
This file contains 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
private void gettingAddressUsingLatLng(double latitude, double longitude) { | |
Geocoder geocoder = new Geocoder(this, Locale.getDefault()); | |
List<Address> addresses = null; | |
try { | |
addresses = geocoder.getFromLocation( | |
latitude, | |
longitude, | |
1); | |
}catch (IOException e) { | |
e.printStackTrace(); |
This file contains 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
private fun measureFoodImageLayoutAtRuntime() { | |
// here adfAppBar is the root layout | |
val layoutParam = afdAppBar?.layoutParams as CoordinatorLayout.LayoutParams | |
layoutParam.height = U.getScreenHeight(this) / 3 | |
afdAppBar?.layoutParams = layoutParam | |
afdAppBar?.requestLayout() | |
} |
This file contains 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
Layout | |
```` | |
<android.support.design.widget.TabLayout | |
android:id="@+id/tabOrderStatus" | |
android:layout_width="match_parent" | |
android:layout_height="56dp" | |
android:background="@color/colorPrimary" | |
app:tabGravity="fill" | |
app:tabIndicatorColor="@color/colorAccent" |
This file contains 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.osellers.common.restclient | |
import android.content.Context | |
import com.durbinlabs.duplate.common.utils.U | |
import com.osellers.common.BuildConfig | |
import com.osellers.common.utils.C | |
import com.osellers.common.utils.D | |
import com.osellers.common.utils.Lg | |
import io.reactivex.Observable | |
import io.reactivex.Observer |
This file contains 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.lastblade.common.restclient | |
import android.content.Context | |
import com.durbinlabs.duplate.common.utils.U | |
import com.osellers.common.BuildConfig | |
import com.lastblade.common.utils.C | |
import com.lastblade.common.utils.D | |
import com.lastblade.common.utils.Lg | |
import io.reactivex.Observable | |
import io.reactivex.Observer |
This file contains 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
// For pre lollipop and post lollipop | |
import android.content.IntentFilter | |
import android.net.ConnectivityManager.CONNECTIVITY_ACTION | |
import android.util.Log | |
import com.firebase.jobdispatcher.JobParameters | |
import com.firebase.jobdispatcher.JobService | |
import com.osellers.fragments.HomeFragment | |
import com.osellers.receiver.ConnectivityReceiver |
OlderNewer