lostyazilim
tr.link

Android Studio Flutter Entegrasyonu Hk.

8 Mesajlar 1.258 Okunma
lstbozum
tr.link

emrexbt8 emrexbt8 Mergen Bilişim GmbH Kullanıcı
  • Üyelik 24.01.2020
  • Yaş/Cinsiyet 25 / E
  • Meslek Öğrenci
  • Konum Çorum
  • Ad Soyad Y** B**
  • Mesajlar 912
  • Beğeniler 91 / 118
  • Ticaret 1, (%100)
Merhaba değerli forum sakinleri, Android Studio üzerine Flutter'i entegre etmek istiyorum fakat yapamadım nasıl yapabilirim. Yardımcı olabiliceklere AnyDesk ID atabilirim :)
 

 

wmaraci
reklam

TuncerK TuncerK WM Aracı Kimlik Onayı
  • Üyelik 29.10.2013
  • Yaş/Cinsiyet 55 / E
  • Meslek insaat
  • Konum Tekirdağ
  • Ad Soyad T** K**
  • Mesajlar 147
  • Beğeniler 19 / 19
  • Ticaret 0, (%0)
Android Studio açtığında solda plugin var ordan ekle
 

 

emrexbt8 emrexbt8 Mergen Bilişim GmbH Kullanıcı
  • Üyelik 24.01.2020
  • Yaş/Cinsiyet 25 / E
  • Meslek Öğrenci
  • Konum Çorum
  • Ad Soyad Y** B**
  • Mesajlar 912
  • Beğeniler 91 / 118
  • Ticaret 1, (%100)
.....
 

 

emrexbt8 emrexbt8 Mergen Bilişim GmbH Kullanıcı
  • Üyelik 24.01.2020
  • Yaş/Cinsiyet 25 / E
  • Meslek Öğrenci
  • Konum Çorum
  • Ad Soyad Y** B**
  • Mesajlar 912
  • Beğeniler 91 / 118
  • Ticaret 1, (%100)

TuncerK adlı üyeden alıntı

Android Studio açtığında solda plugin var ordan ekle


Build ederken hata veriyor hocam sdk indirdim yükledim pluginleride yükledim ama
 

 

wmaraci
wmaraci

s60v3 s60v3 Informatiker Kullanıcı
  • Üyelik 22.07.2014
  • Yaş/Cinsiyet 34 / E
  • Meslek Flutter Developer
  • Konum Mersin
  • Ad Soyad M** A**
  • Mesajlar 247
  • Beğeniler 23 / 77
  • Ticaret 0, (%0)
Hata veriyor diye sorun anlatılmaz hocam, elimizde neler var onları da yazmanız gerekiyor
 

 

Codeigniter&PHP | Vue.js | Dart&Flutter

emrexbt8 emrexbt8 Mergen Bilişim GmbH Kullanıcı
  • Üyelik 24.01.2020
  • Yaş/Cinsiyet 25 / E
  • Meslek Öğrenci
  • Konum Çorum
  • Ad Soyad Y** B**
  • Mesajlar 912
  • Beğeniler 91 / 118
  • Ticaret 1, (%100)
.....
 

 

emrexbt8 emrexbt8 Mergen Bilişim GmbH Kullanıcı
  • Üyelik 24.01.2020
  • Yaş/Cinsiyet 25 / E
  • Meslek Öğrenci
  • Konum Çorum
  • Ad Soyad Y** B**
  • Mesajlar 912
  • Beğeniler 91 / 118
  • Ticaret 1, (%100)

s60v3 adlı üyeden alıntı

Hata veriyor diye sorun anlatılmaz hocam, elimizde neler var onları da yazmanız gerekiyor


Hocam şimdi uygulamada son silinen içerikler diye bir yer var oradaki bir gönderiye tıklayınca silmek veya geri yüklemek için uygulamadan atıyor. Debug modda çalıştırdığımda ise şu hata çıkıyor:

--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.rantrum.katana, PID: 17270
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.balysv.materialripple.MaterialRippleLayout.setVisibility(int)' on a null object reference
at com.rantrum.katana.RecentlyDeletedFragment.showItemActionDialog(RecentlyDeletedFragment.java:381)
at com.rantrum.katana.RecentlyDeletedFragment.access$000(RecentlyDeletedFragment.java:52)
at com.rantrum.katana.RecentlyDeletedFragment$1.onItemClick(RecentlyDeletedFragment.java:142)
at com.rantrum.katana.adapter.AdvancedItemListAdapter.onItemMenuButtonClick(AdvancedItemListAdapter.java:1520)
at com.rantrum.katana.adapter.AdvancedItemListAdapter.access$100(AdvancedItemListAdapter.java:106)
at com.rantrum.katana.adapter.AdvancedItemListAdapter$12.onClick(AdvancedItemListAdapter.java:921)
at android.view.View.performClick(View.java:7448)
at android.view.View.performClickInternal(View.java:7425)
at android.view.View.access$3600(View.java:810)
at android.view.View$PerformClick.run(View.java:28305)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
I/Process: Sending signal. PID: 17270 SIG: 9
Disconnected from the target VM, address: 'localhost:51273', transport: 'socket'
 

 

emrexbt8 emrexbt8 Mergen Bilişim GmbH Kullanıcı
  • Üyelik 24.01.2020
  • Yaş/Cinsiyet 25 / E
  • Meslek Öğrenci
  • Konum Çorum
  • Ad Soyad Y** B**
  • Mesajlar 912
  • Beğeniler 91 / 118
  • Ticaret 1, (%100)
Kod içeriğim şu şekilde:

package com.rantrum.katana;

import android.app.Activity;
import android.app.Dialog;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import androidx.appcompat.app.AlertDialog;
import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;

import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.balysv.materialripple.MaterialRippleLayout;
import com.google.android.material.bottomsheet.BottomSheetBehavior;
import com.google.android.material.bottomsheet.BottomSheetDialog;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import com.rantrum.katana.adapter.AdvancedItemListAdapter;
import com.rantrum.katana.app.App;
import com.rantrum.katana.constants.Constants;
import com.rantrum.katana.model.Item;
import com.rantrum.katana.util.Api;
import com.rantrum.katana.util.CustomRequest;

public class RecentlyDeletedFragment extends Fragment implements Constants, SwipeRefreshLayout.OnRefreshListener {

private static final String STATE_LIST = "State Adapter Data";

private RecyclerView mRecyclerView;
private NestedScrollView mNestedView;

private SwipeRefreshLayout mItemsContainer;

private BottomSheetBehavior mBehavior;
private BottomSheetDialog mBottomSheetDialog;
private View mBottomSheet;

private TextView mMessage;
private ImageView mSplash;

private ArrayList itemsList;
private AdvancedItemListAdapter itemsAdapter;

private int itemId = 0;
private int arrayLength = 0;
private Boolean loadingMore = false;
private Boolean viewMore = false;
private Boolean restore = false;

public RecentlyDeletedFragment() {
// Required empty public constructor
}

@Override
public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

if (savedInstanceState != null) {

itemsList = savedInstanceState.getParcelableArrayList(STATE_LIST);
itemsAdapter = new AdvancedItemListAdapter(getActivity(), itemsList);

restore = savedInstanceState.getBoolean("restore");
itemId = savedInstanceState.getInt("itemId");

} else {

itemsList = new ArrayList();
itemsAdapter = new AdvancedItemListAdapter(getActivity(), itemsList);

restore = false;
itemId = 0;
}
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

View rootView = inflater.inflate(R.layout.fragment_recently_deleted, container, false);

mItemsContainer = (SwipeRefreshLayout) rootView.findViewById(R.id.container_items);
mItemsContainer.setOnRefreshListener(this);

//

mMessage = (TextView) rootView.findViewById(R.id.message);
mSplash = (ImageView) rootView.findViewById(R.id.splash);

// Prepare bottom sheet

mBottomSheet = rootView.findViewById(R.id.bottom_sheet);
mBehavior = BottomSheetBehavior.from(mBottomSheet);

//

mNestedView = (NestedScrollView) rootView.findViewById(R.id.nested_view);

mRecyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view);

itemsAdapter.setOnMoreButtonClickListener(new AdvancedItemListAdapter.OnItemMenuButtonClickListener() {

@Override
public void onItemClick(View v, Item obj, int actionId, int position) {

switch (actionId){

case ITEM_ACTION_REPOST: {

break;
}

case ITEM_ACTIONS_MENU: {

showItemActionDialog(position);

break;
}
}
}
});

final GridLayoutManager mLayoutManager = new GridLayoutManager(getActivity(), 1);

mRecyclerView.setLayoutManager(mLayoutManager);

mRecyclerView.setAdapter(itemsAdapter);

mRecyclerView.setNestedScrollingEnabled(false);

mNestedView.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() {

@Override
public void onScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {

if (scrollY < oldScrollY) { // up


}

if (scrollY > oldScrollY) { // down


}

if (scrollY == (v.getChildAt(0).getMeasuredHeight() - v.getMeasuredHeight())) {

if (!loadingMore && (viewMore) && !(mItemsContainer.isRefreshing())) {

mItemsContainer.setRefreshing(true);

loadingMore = true;

getItems();
}
}
}
});


if (itemsAdapter.getItemCount() == 0) {

showMessage(getText(R.string.label_empty_list).toString());

} else {

hideMessage();
}

if (!restore) {

showMessage(getText(R.string.msg_loading_2).toString());

getItems();
}

return rootView;
}

@Override
public void onSaveInstanceState(Bundle outState) {

super.onSaveInstanceState(outState);

outState.putBoolean("restore", true);
outState.putInt("itemId", itemId);
outState.putParcelableArrayList(STATE_LIST, itemsList);
}

@Override
public void onRefresh() {

if (App.getInstance().isConnected()) {

itemId = 0;
getItems();

} else {

mItemsContainer.setRefreshing(false);
}
}

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {

super.onActivityResult(requestCode, resultCode, data);
}

@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {

super.onCreateOptionsMenu(menu, inflater);
}

public void getItems() {

mItemsContainer.setRefreshing(true);

CustomRequest jsonReq = new CustomRequest(Request.Method.POST, METHOD_ITEMS_GET_RECENTLY_DELETED, null,
new Response.Listener() {
@Override
public void onResponse(JSONObject response) {

if (!isAdded() || getActivity() == null) {

Log.e("ERROR", "RecentlyDeletedFragment Not Added to Activity");

return;
}

if (!loadingMore) {

itemsList.clear();
}

try {

arrayLength = 0;

if (!response.getBoolean("error")) {

itemId = response.getInt("itemId");

if (response.has("items")) {

JSONArray itemsArray = response.getJSONArray("items");

arrayLength = itemsArray.length();

if (arrayLength > 0) {

for (int i = 0; i < itemsArray.length(); i++) {

JSONObject itemObj = (JSONObject) itemsArray.get(i);

Item item = new Item(itemObj);

item.setAd(0);

itemsList.add(item);
}
}
}
}

} catch (JSONException e) {

e.printStackTrace();

} finally {

loadingComplete();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {

if (!isAdded() || getActivity() == null) {

Log.e("ERROR", "RecentlyDeletedFragment Not Added to Activity");

return;
}

loadingComplete();
}
}) {

@Override
protected Map getParams() {
Map params = new HashMap();
params.put("accountId", Long.toString(App.getInstance().getId()));
params.put("accessToken", App.getInstance().getAccessToken());
params.put("itemId", Integer.toString(itemId));
params.put("language", "en");

return params;
}
};

App.getInstance().addToRequestQueue(jsonReq);
}

public void loadingComplete() {

if (arrayLength == LIST_ITEMS) {

viewMore = true;

} else {

viewMore = false;
}

itemsAdapter.notifyDataSetChanged();

if (itemsAdapter.getItemCount() == 0) {

if (RecentlyDeletedFragment.this.isVisible()) {

showMessage(getText(R.string.label_empty_list).toString());
}

} else {

hideMessage();
}

loadingMore = false;
mItemsContainer.setRefreshing(false);
}


// Item action


private void showItemActionDialog(final int position) {

if (mBehavior.getState() == BottomSheetBehavior.STATE_EXPANDED) {

mBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
}

final View view = getLayoutInflater().inflate(R.layout.item_restore_actions_sheet_list, null);

MaterialRippleLayout mRestoreButton = (MaterialRippleLayout) view.findViewById(R.id.restore_button);
MaterialRippleLayout mDeleteButton = (MaterialRippleLayout) view.findViewById(R.id.delete_button);
MaterialRippleLayout mPinButton = (MaterialRippleLayout) view.findViewById(R.id.pin_button);

final Item item = itemsList.get(position);

mPinButton.setVisibility(View.GONE);

mRestoreButton.setVisibility(View.VISIBLE);
mDeleteButton.setVisibility(View.VISIBLE);

mRestoreButton.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View view) {

mBottomSheetDialog.dismiss();

restore(position);
}
});

mDeleteButton.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View view) {

mBottomSheetDialog.dismiss();

delete(position);
}
});

mBottomSheetDialog = new BottomSheetDialog(getActivity());

mBottomSheetDialog.setContentView(view);

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {

mBottomSheetDialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}

mBottomSheetDialog.show();

doKeepDialog(mBottomSheetDialog);

mBottomSheetDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {

@Override
public void onDismiss(DialogInterface dialog) {

mBottomSheetDialog = null;
}
});
}

// Prevent dialog dismiss when orientation changes
private static void doKeepDialog(Dialog dialog){

WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
lp.copyFrom(dialog.getWindow().getAttributes());
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
lp.height = WindowManager.LayoutParams.MATCH_PARENT;
dialog.getWindow().setAttributes(lp);
}

public void delete(final int position) {

AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());
alertDialog.setTitle(getText(R.string.label_delete_permanently_post));

alertDialog.setMessage(getText(R.string.label_delete_permanently_post_desc));
alertDialog.setCancelable(true);

alertDialog.setNegativeButton(getText(R.string.action_no), new DialogInterface.OnClickListener() {

@Override
public void onClick(DialogInterface dialog, int which) {

dialog.cancel();
}
});

alertDialog.setPositiveButton(getText(R.string.action_yes), new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int which) {

final Item item = itemsList.get(position);

itemsList.remove(position);
itemsAdapter.notifyDataSetChanged();

if (itemsAdapter.getItemCount() == 0) {

showMessage(getText(R.string.label_empty_list).toString());
}

if (App.getInstance().isConnected()) {

Api api = new Api(getActivity());

api.postDelete(item.getId(), 0);

} else {

Toast.makeText(getActivity(), getText(R.string.msg_network_error), Toast.LENGTH_SHORT).show();
}
}
});

alertDialog.show();
}

public void restore(final int position) {

AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());
alertDialog.setTitle(getText(R.string.label_restore_post));

alertDialog.setMessage(getText(R.string.label_restore_post_desc));
alertDialog.setCancelable(true);

alertDialog.setNegativeButton(getText(R.string.action_no), new DialogInterface.OnClickListener() {

@Override
public void onClick(DialogInterface dialog, int which) {

dialog.cancel();
}
});

alertDialog.setPositiveButton(getText(R.string.action_yes), new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int which) {

final Item item = itemsList.get(position);

itemsList.remove(position);
itemsAdapter.notifyDataSetChanged();

if (itemsAdapter.getItemCount() == 0) {

showMessage(getText(R.string.label_empty_list).toString());
}

if (App.getInstance().isConnected()) {

Api api = new Api(getActivity());

api.itemRestore(item.getId());

} else {

Toast.makeText(getActivity(), getText(R.string.msg_network_error), Toast.LENGTH_SHORT).show();
}
}
});

alertDialog.show();
}


//

public void showMessage(String message) {

mMessage.setText(message);
mMessage.setVisibility(View.VISIBLE);

mSplash.setVisibility(View.VISIBLE);
}

public void hideMessage() {

mMessage.setVisibility(View.GONE);

mSplash.setVisibility(View.GONE);
}

@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
}

@Override
public void onDetach() {
super.onDetach();
}
}
 

 

wmaraci
wmaraci
Konuyu toplam 1 kişi okuyor. (0 kullanıcı ve 1 misafir)
Site Ayarları
  • Tema Seçeneği
  • Site Sesleri
  • Bildirimler
  • Özel Mesaj Al