Created
November 5, 2018 21:14
-
-
Save jumaallan/c68a683f4571255b96b57e9d3f799631 to your computer and use it in GitHub Desktop.
Sharing code with Madonah
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.twigafoods.soko.ui.sourcing.farms.ui; | |
import android.annotation.SuppressLint; | |
import android.app.Activity; | |
import android.app.Dialog; | |
import android.arch.lifecycle.Observer; | |
import android.arch.lifecycle.ViewModelProvider; | |
import android.arch.lifecycle.ViewModelProviders; | |
import android.content.DialogInterface; | |
import android.content.Intent; | |
import android.graphics.drawable.Drawable; | |
import android.os.Bundle; | |
import android.support.annotation.Nullable; | |
import android.support.v7.app.AlertDialog; | |
import android.support.v7.app.AppCompatActivity; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.support.v7.widget.Toolbar; | |
import android.text.TextUtils; | |
import android.util.DisplayMetrics; | |
import android.util.Log; | |
import android.view.LayoutInflater; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.view.View; | |
import android.view.WindowManager; | |
import android.widget.AdapterView; | |
import android.widget.ArrayAdapter; | |
import android.widget.Button; | |
import android.widget.EditText; | |
import android.widget.LinearLayout; | |
import android.widget.TextView; | |
import com.toptoche.searchablespinnerlibrary.SearchableSpinner; | |
import com.twigafoods.soko.R; | |
import com.twigafoods.soko.SokoApplication; | |
import com.twigafoods.soko.data.model.sourcing.CollectionCenter; | |
import com.twigafoods.soko.data.model.sourcing.HarvestArea; | |
import com.twigafoods.soko.ui.common.ui.MainDashboardActivity; | |
import com.twigafoods.soko.ui.sourcing.farms.adapter.ProductListRecyclerViewAdapter; | |
import com.twigafoods.soko.ui.sourcing.farms.viewmodel.FarmRegistrationViewModel; | |
import com.twigafoods.soko.ui.sourcing.models.ProductView; | |
import com.twigafoods.soko.util.AlertDialogFragment; | |
import com.twigafoods.soko.util.LocationService; | |
import com.twigafoods.soko.util.SharedPreferenceManager; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Objects; | |
import java.util.UUID; | |
import javax.inject.Inject; | |
import javax.inject.Named; | |
import butterknife.BindView; | |
import butterknife.ButterKnife; | |
import butterknife.OnClick; | |
import static com.twigafoods.soko.util.Util.normalizePhoneNumber; | |
public class AddFarmActivity extends AppCompatActivity implements AlertDialogFragment.AlertDialogListener { | |
@BindView(R.id.tvManager) | |
TextView tvManager; | |
@BindView(R.id.tvLeeser) | |
TextView tvLeeser; | |
@BindView(R.id.tvOwner) | |
TextView tvOwner; | |
@BindView(R.id.edtSize) | |
EditText edtSize; | |
@BindView(R.id.toolbar) | |
Toolbar toolbar; | |
@BindView(R.id.tvFarmerName) | |
TextView tvFarmerName; | |
@BindView(R.id.tvPhoneNumber) | |
TextView tvPhoneNumber; | |
@BindView(R.id.spcc) | |
SearchableSpinner spnCc; | |
@BindView(R.id.spHarvestArea) | |
SearchableSpinner spnHarvestArea; | |
@BindView(R.id.recyclerviewProducts) | |
RecyclerView recyclerViewProducts; | |
@BindView(R.id.toolbarTitle) | |
TextView toolbarTitle; | |
@BindView(R.id.layout_error_type_farmer) | |
LinearLayout layoutErrorTypeFarmer; | |
@BindView(R.id.layout_error_product) | |
LinearLayout layoutProduct; | |
FarmRegistrationViewModel farmRegistrationViewModel; | |
@Inject | |
@Named("FarmCustomViewModelFactory") | |
ViewModelProvider.Factory viewModelFactory; | |
private String farmerId, farmId; | |
private String farmerFullName; | |
private String phoneNumber; | |
private String farmerType = null; | |
//save list of items selected indexes | |
private ArrayList<Integer> productsSelectedIndex = new ArrayList<>();; | |
private ArrayList<Integer> productsIndex = productsSelectedIndex; | |
public static List<ProductView> productsListSelected; | |
private List<ProductView> productList; | |
private List<HarvestArea> harvestAreaList; | |
private List<CollectionCenter> collectionCenterList; | |
private String[] arrayProductNames; | |
private String[] arrayProductIds; | |
private boolean[] mSelectedProducts = new boolean[110]; | |
private boolean[] clickedItems = mSelectedProducts; | |
private ArrayList<String> collectionCenterNameList; | |
private ArrayList<String> collectionCenterIdList; | |
private ArrayList<String> harvestAreaNameList; | |
private ArrayList<String> harvestAreaIdList; | |
private StringBuilder stringBuilderProducts; | |
private String harvestAreaName; | |
private String collectionCenterName; | |
private String harvestAreaId; | |
private String collectionCenterId; | |
private Dialog dialog; | |
public static Activity addFarmActivity; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_add_farm); | |
ButterKnife.bind(this); | |
addFarmActivity = this; | |
layoutErrorTypeFarmer.setVisibility(View.GONE); | |
layoutProduct.setVisibility(View.GONE); | |
Drawable upArrow = getResources().getDrawable(R.drawable.ic_chevron_left_white_24dp); | |
toolbar.setNavigationIcon(upArrow); | |
setSupportActionBar(toolbar); | |
((SokoApplication) this.getApplication()) | |
.getApplicationComponent() | |
.inject(this); | |
//Set up and subscribe (observe) to the ViewModel | |
farmRegistrationViewModel = ViewModelProviders.of(this, viewModelFactory) | |
.get(FarmRegistrationViewModel.class); | |
//check if location is enabled | |
if (!SharedPreferenceManager.isLocationEnabled(this)) { | |
AlertDialogFragment.showAlert(AlertDialogFragment.LOCATION_DISABLED, | |
this, getSupportFragmentManager()); | |
} | |
//start location service | |
new LocationService(this); | |
toolbarTitle.setText(getResources().getString(R.string.activity_farm)); | |
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true); | |
getSupportActionBar().setDisplayShowHomeEnabled(true); | |
farmerType = ""; | |
Intent intent = getIntent(); | |
Bundle bundle = intent.getExtras(); | |
if (null == bundle) throw new AssertionError(); | |
this.farmerId = bundle.getString("farmerId"); | |
this.farmerFullName = bundle.getString("farmerFullName"); | |
this.phoneNumber = bundle.getString("phoneNumber"); | |
//setup views | |
tvFarmerName.setText(farmerFullName); | |
tvPhoneNumber.setText(normalizePhoneNumber(phoneNumber)); | |
spnHarvestArea.setTitle("Select Harvest Area"); | |
spnCc.setTitle("Select Collection Center"); | |
spnCc.setPositiveButton("OK"); | |
spnHarvestArea.setPositiveButton("OK"); | |
farmRegistrationViewModel.getCollectionCenters().observe(this, new Observer<List<CollectionCenter>>() { | |
@Override | |
public void onChanged(@Nullable List<CollectionCenter> collectionCenters) { | |
setListCollectionCenter(collectionCenters); | |
} | |
}); | |
farmRegistrationViewModel.getProducts(getString(R.string.businessdomain_harvest)).observe(this, new Observer<List<ProductView>>() { | |
@Override | |
public void onChanged(@Nullable List<ProductView> products) { | |
setListProducts(products); | |
} | |
}); | |
spnCc.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | |
@Override | |
public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long id) { | |
collectionCenterName = spnCc.getSelectedItem().toString(); | |
collectionCenterId = collectionCenterIdList.get(position); | |
FetchHarvestAreas(collectionCenterId); | |
} | |
@Override | |
public void onNothingSelected(AdapterView<?> arg0) { | |
// TODO Auto-generated method stub | |
} | |
}); | |
spnHarvestArea.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { | |
@Override | |
public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long id) { | |
AddFarmActivity.this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); | |
harvestAreaName = spnHarvestArea.getSelectedItem().toString(); | |
harvestAreaId = harvestAreaIdList.get(position); | |
} | |
@Override | |
public void onNothingSelected(AdapterView<?> arg0) { | |
// TODO Auto-generated method stub | |
} | |
}); | |
} | |
public void setListProducts(final List<ProductView> listOfProducts) { | |
this.productList = listOfProducts; | |
arrayProductNames = new String[productList.size()]; | |
arrayProductIds = new String[productList.size()]; | |
for (int i = 0; i < productList.size(); i++) { | |
arrayProductNames[i] = productList.get(i).getProductName(); | |
arrayProductIds[i] = productList.get(i).getProductId(); | |
//getProductName or any suitable method | |
} | |
} | |
public void setListCollectionCenter(final List<CollectionCenter> listOfCollectionCenters) { | |
this.collectionCenterList = listOfCollectionCenters; | |
collectionCenterNameList = new ArrayList<>(); | |
collectionCenterIdList = new ArrayList<>(); | |
collectionCenterNameList.add("- Select Collection Center -"); | |
collectionCenterIdList.add(""); | |
for (CollectionCenter item : collectionCenterList) { | |
collectionCenterNameList.add(item.getCollectionCenterName()); | |
collectionCenterIdList.add(item.getCollectionCenterId()); | |
} | |
ArrayAdapter<String> locationsAdapter = new ArrayAdapter<String>(AddFarmActivity.this, | |
R.layout.spinner_item_rg, collectionCenterNameList); | |
locationsAdapter.setDropDownViewResource(R.layout.spinner_item_rg2); | |
spnCc.setAdapter(locationsAdapter); | |
} | |
public void FetchHarvestAreas(final String collectionCenterId) { | |
farmRegistrationViewModel.getHarvestAreaByCollectionCenterId(collectionCenterId).observe(this, new Observer<List<HarvestArea>>() { | |
@Override | |
public void onChanged(@Nullable List<HarvestArea> harvestAreas) { | |
setListHarvestAreas(harvestAreas); | |
Log.d("Check harvestAreas", "" + harvestAreas); | |
} | |
}); | |
} | |
public void setListHarvestAreas(final List<HarvestArea> listOfHarvestAreas) { | |
this.harvestAreaList = listOfHarvestAreas; | |
harvestAreaNameList = new ArrayList<>(); | |
harvestAreaIdList = new ArrayList<>(); | |
harvestAreaNameList.add("- Select Harvest Area -"); | |
harvestAreaIdList.add(""); | |
for (HarvestArea item : harvestAreaList) { | |
harvestAreaNameList.add(item.getHarvestAreaName()); | |
harvestAreaIdList.add(item.getHarvestAreaId()); | |
} | |
ArrayAdapter<String> collectionCenterAdapter = new ArrayAdapter<String>(AddFarmActivity.this, | |
R.layout.spinner_item_rg, harvestAreaNameList); | |
collectionCenterAdapter.setDropDownViewResource(R.layout.spinner_item_rg2); | |
spnHarvestArea.setAdapter(collectionCenterAdapter); | |
} | |
@Override | |
protected void onPause() { | |
super.onPause(); | |
} | |
@Override | |
protected void onStart() { | |
super.onStart(); | |
} | |
@Override | |
protected void onStop() { | |
this.stopService(new Intent(this, LocationService.class)); | |
super.onStop(); | |
} | |
@Override | |
public boolean onCreateOptionsMenu(Menu menu) { | |
getMenuInflater().inflate(R.menu.home_main_menu, menu); | |
return true; | |
} | |
@Override | |
public boolean onSupportNavigateUp() { | |
finish(); | |
onBackPressed(); | |
return true; | |
} | |
public void homepage() { | |
Intent intent = new Intent(getApplicationContext(), MainDashboardActivity.class); | |
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | |
startActivity(intent); | |
finish(); | |
} | |
@Override | |
public boolean onOptionsItemSelected(MenuItem item) { | |
int id = item.getItemId(); | |
//noinspection SimplifiableIfStatement | |
if (id == R.id.action_home) { | |
homepage(); | |
return true; | |
} | |
return super.onOptionsItemSelected(item); | |
} | |
@OnClick(R.id.buttonNext) | |
public void btnNext(View view) { | |
String farmSize = edtSize.getText().toString(); | |
if (farmerType.isEmpty()) { | |
layoutErrorTypeFarmer.setVisibility(View.VISIBLE); | |
return; | |
} | |
if (TextUtils.isEmpty(farmSize)) { | |
edtSize.setError(this.getResources().getString(R.string.activity_error_size)); | |
return; | |
} | |
if (stringBuilderProducts == null) { | |
layoutProduct.setVisibility(View.VISIBLE); | |
return; | |
} | |
if (collectionCenterName.equals("- Select Collection Center -")) { | |
TextView errorText = (TextView) spnCc.getSelectedView(); | |
errorText.setError(""); | |
errorText.setTextColor(getResources().getColor(R.color.colorWarning)); | |
errorText.setText("- Select Collection Center -"); | |
return; | |
} | |
if (harvestAreaName.equals("- Select Harvest Area -")) { | |
TextView errorText = (TextView) spnHarvestArea.getSelectedView(); | |
errorText.setError(""); | |
errorText.setTextColor(getResources().getColor(R.color.colorWarning)); | |
errorText.setText("- Select Harvest Area -"); | |
return; | |
} | |
Intent intent = new Intent(getApplicationContext(), FarmLocationActivity.class); | |
Bundle b = new Bundle(); | |
b.putString("farmerId", farmerId); | |
b.putString("farmId", UUID.randomUUID().toString()); | |
b.putString("farmerName", farmerFullName); | |
b.putString("farmSize", farmSize); | |
b.putString("farmerType", farmerType); | |
b.putString("harvestArea", harvestAreaName); | |
b.putString("phoneNumber", phoneNumber); | |
b.putString("collectionCenter", collectionCenterName); | |
b.putString("harvestAreaId", harvestAreaId); | |
b.putString("collectionCenterId", collectionCenterId); | |
b.putString("products", String.valueOf(stringBuilderProducts).substring(1)); | |
intent.putExtras(b); | |
startActivity(intent); | |
} | |
//Select Add farm products | |
@OnClick(R.id.tvOwner) | |
public void tvOwner(View view) { | |
tvOwner.setBackgroundResource(R.drawable.bg_blue_button_sharp); | |
tvLeeser.setBackgroundResource(R.drawable.bg_white_button_sharp); | |
tvManager.setBackgroundResource(R.drawable.bg_white_button_sharp); | |
tvOwner.setTextColor(getResources().getColor(R.color.white)); | |
tvLeeser.setTextColor(getResources().getColor(R.color.bg_login_button)); | |
tvManager.setTextColor(getResources().getColor(R.color.bg_login_button)); | |
farmerType = "Owner"; | |
layoutErrorTypeFarmer.setVisibility(View.GONE); | |
} | |
@OnClick(R.id.tvLeeser) | |
public void tvLeeser(View view) { | |
tvOwner.setBackgroundResource(R.drawable.bg_white_button_sharp); | |
tvLeeser.setBackgroundResource(R.drawable.bg_blue_button_sharp); | |
tvManager.setBackgroundResource(R.drawable.bg_white_button_sharp); | |
tvOwner.setTextColor(getResources().getColor(R.color.bg_login_button)); | |
tvLeeser.setTextColor(getResources().getColor(R.color.white)); | |
tvManager.setTextColor(getResources().getColor(R.color.bg_login_button)); | |
farmerType = "Leaser"; | |
layoutErrorTypeFarmer.setVisibility(View.GONE); | |
} | |
@OnClick(R.id.tvManager) | |
public void tvManager(View view) { | |
tvOwner.setBackgroundResource(R.drawable.bg_white_button_sharp); | |
tvLeeser.setBackgroundResource(R.drawable.bg_white_button_sharp); | |
tvManager.setBackgroundResource(R.drawable.bg_blue_button_sharp); | |
tvOwner.setTextColor(getResources().getColor(R.color.bg_login_button)); | |
tvLeeser.setTextColor(getResources().getColor(R.color.bg_login_button)); | |
tvManager.setTextColor(getResources().getColor(R.color.white)); | |
farmerType = "Manager"; | |
layoutErrorTypeFarmer.setVisibility(View.GONE); | |
} | |
@OnClick(R.id.btnAddProducts) | |
public void btnAddProducts(View view) { | |
layoutProduct.setVisibility(View.GONE); | |
View alertView; | |
final StringBuilder stringBuilder = new StringBuilder(); | |
productsListSelected = new ArrayList<>(); | |
@SuppressLint("RestrictedApi") | |
final LayoutInflater inflaterDialog = LayoutInflater.from(this); | |
alertView = inflaterDialog.inflate(R.layout.dialog_products, null); | |
AlertDialog.Builder builder = new AlertDialog.Builder(this); | |
Button btnDone = alertView.findViewById(R.id.btnDone); | |
Button btnCancel = alertView.findViewById(R.id.btnCancel); | |
builder.setTitle("Select Farm Produce: "); | |
builder.setMultiChoiceItems(arrayProductNames, mSelectedProducts, | |
new DialogInterface.OnMultiChoiceClickListener() { | |
@Override | |
public void onClick(DialogInterface dialog, int selectedItemId, boolean isSelected) { | |
if (isSelected) { | |
productsSelectedIndex.add(selectedItemId); | |
} else if (productsSelectedIndex.contains(selectedItemId)) { | |
productsSelectedIndex.remove(Integer.valueOf(selectedItemId)); | |
} | |
productsSelectedIndex = productsIndex; | |
clickedItems[selectedItemId]=isSelected; | |
} | |
}); | |
//builder.setView(alertView);f | |
builder.setPositiveButton("Done", new DialogInterface.OnClickListener() { | |
@Override | |
public void onClick(DialogInterface dialog, int which) { | |
if (productsSelectedIndex.size() != 0) { | |
for (int i = 0; i < productsSelectedIndex.size(); i++) { | |
String productsName = arrayProductNames[productsSelectedIndex.get(i)]; | |
String productId = arrayProductIds[productsSelectedIndex.get(i)]; | |
productsListSelected.add(new ProductView(productId,productsName)); | |
stringBuilderProducts = stringBuilder.append("," + productsName); | |
} | |
mSelectedProducts = clickedItems; | |
AddFarmActivity.this.setAddProducts(productsListSelected); | |
} | |
dialog.cancel(); | |
} | |
}); | |
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { | |
@Override | |
public void onClick(DialogInterface dialog, int which) { | |
dialog.cancel(); | |
} | |
}); | |
dialog = builder.create(); | |
dialog.show(); | |
// Get screen width and height in pixels | |
DisplayMetrics displayMetrics = new DisplayMetrics(); | |
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); | |
// The absolute width of the available display size in pixels. | |
int displayWidth = displayMetrics.widthPixels; | |
int displayHeight = displayMetrics.heightPixels; | |
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams(); | |
layoutParams.copyFrom(dialog.getWindow().getAttributes()); | |
//layoutParams.height = dialogWindowHeight; | |
dialog.getWindow().setAttributes(layoutParams); | |
} | |
public void setAddProducts(final List<ProductView> productsTests) { | |
LinearLayoutManager layoutManagerCenter | |
= new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false); | |
recyclerViewProducts.setLayoutManager(layoutManagerCenter); | |
ProductListRecyclerViewAdapter adapter = new ProductListRecyclerViewAdapter(this, productsTests); | |
recyclerViewProducts.setAdapter(adapter); | |
} | |
@Override | |
public void onAlertButtonPressed(int eventKey) { | |
} | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/layoutProduce" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="10dp" | |
android:gravity="end" | |
android:orientation="horizontal" | |
android:padding="10dp" | |
android:weightSum="1"> | |
<Button | |
android:id="@+id/btnCancel" | |
style="@style/allEditButtons" | |
android:layout_width="130dp" | |
android:layout_height="@dimen/button_height" | |
android:layout_marginEnd="5dp" | |
android:background="@drawable/bg_edit_button" | |
android:onClick="btnCancel" | |
android:text="@string/cancel" | |
android:textAllCaps="false" /> | |
<Button | |
android:id="@+id/btnDone" | |
style="@style/allSaveButtons" | |
android:layout_width="130dp" | |
android:layout_height="@dimen/button_height" | |
android:layout_marginStart="5dp" | |
android:background="@drawable/save_btn_bg" | |
android:text="@string/done" | |
android:textAllCaps="false" /> | |
</LinearLayout> | |
</LinearLayout> |
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.twigafoods.soko.ui.sourcing.farms.adapter; | |
import android.annotation.SuppressLint; | |
import android.content.Context; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.TextView; | |
import com.twigafoods.soko.R; | |
import com.twigafoods.soko.ui.sourcing.models.ProductView; | |
import java.util.List; | |
import butterknife.BindView; | |
import butterknife.ButterKnife; | |
public class ProductListRecyclerViewAdapter extends RecyclerView.Adapter<ProductListRecyclerViewAdapter.ProductViewHolder> { | |
private Context context; | |
private List<ProductView> productsList; | |
public ProductListRecyclerViewAdapter(Context context, List<ProductView> productsList) { | |
this.context = context; | |
this.productsList = productsList; | |
} | |
@Override | |
public ProductViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { | |
View itemView = LayoutInflater.from(parent.getContext()) | |
.inflate(R.layout.row_add_products, parent, false); | |
return new ProductViewHolder(itemView); | |
} | |
@SuppressLint("SetTextI18n") | |
@Override | |
public void onBindViewHolder(ProductViewHolder holder, final int position) { | |
final ProductView productsTest = productsList.get(position); | |
holder.tvProductName.setText(productsTest.getProductName()); | |
} | |
@Override | |
public int getItemCount() { | |
return productsList.size(); | |
} | |
//method filter | |
public class ProductViewHolder extends RecyclerView.ViewHolder { | |
@BindView(R.id.tvProductName) | |
TextView tvProductName; | |
public ProductViewHolder(View view) { | |
super(view); | |
ButterKnife.bind(this, 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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginEnd="5dp" | |
android:background="@drawable/bg_dim_blue_button_sharp"> | |
<TextView | |
android:id="@+id/tvProductName" | |
android:layout_width="0dp" | |
android:layout_height="37dp" | |
android:layout_weight="1" | |
android:fontFamily="@font/oxygen_regular" | |
android:gravity="center_horizontal|center" | |
android:paddingBottom="5dp" | |
android:paddingLeft="10dp" | |
android:paddingRight="10dp" | |
android:paddingTop="5dp" | |
android:textColor="@color/white" | |
tools:text="TextView" /> | |
</LinearLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment