arg put string in fg newinstance, but it cannt get arg from ac.
in new inststance, it's like,
args.putString("ARG_EVENT_ID_DISPLAY", id); // w/ quotations! stupid!!
it uses it as a plain string not a variable!
textview text does show
reason: nearby textview match_parent so the other one doesnt has space.
instant run disabaled
invoked List.remove(item), but the item is not removed, still showing.
the app is using SQL datebase. list.remove is not for it. use
public voidremoveEvent(Event event) {
String uuidString = event.getUUID().toString();
ContentValues values =getContentValue(event);
mDatabase.delete(EventTable.NAME,
EventTable.Cols.UUID+" = ?", // is the value next line
newString[] {uuidString});
}
app crashes + in logcat it goes through all apps in the phone
in manifest, did't declare a certain activity
nevigation icon does navigate
in the activity,
toolbar.setNavigationIcon(R.drawable.ic_menu);
list/detail & fg/ac communicate
no matter from add button or from a list item to start the detail activity, when start the ac, it already has a uuid. if from the add button, on click, Obj o = new Obj. once create, it comes with a uuid. b/c in Obj construcor { UUID = random.UUID}
if not use Fg.newInstrance(uuid), instead use new Fg then it always get a fresh new fg???
这个 activity 一 start app crashes
a textinput layout in this ac/fg's xml layoutfile is empty.
databinding obj cant call recyclerView
reason: there are two databinding classes included: Fragment..Binding class in oncreateview() and ItemBinding class in view Holder construcotor.
for loop squickling line error: typoed if for for
binding class - cant solve symbol
solution - there's a 8- indentation in the fragment xml, instead of 4. when change to 4, the item binding class is found.
reasons:
没有产生,或叫其他名字
- how to check data binding class's name?
to find: type Binding and press up key to pick from list.
The specified child already has a parent.
reason: in one of the inflater.inflate() method, missing the 3rd parameter false
inflate() parameters
parserXmlPullParser: XML dom node containing the description of the view hierarchy.
rootViewGroup: Optional view to be the parent of the generated hierarchy (ifattachToRootis true), or else simply an object that provides a set of LayoutParams values for root of the returned hierarchy (ifattachToRootis false.)
attachToRootboolean: Whether the inflated hierarchy should be attached to the root parameter? If false, root is only used to create the correct subclass of LayoutParams for the root view in the XML.
launch app, showing a constant loading circle that not designed. not show the list
+ the list fragment is never used.
reason: there is a class called ListFragment in android support lib. accidently named a same name class with it and used it instread of the one just created.
* check imports to see if strange classes imported.
recyclerview doesnt show any items or only shows one
1, item height is match parent, so only show one
2, null object reference
class fragment { on create view { reference the recycler view layout
class holder { in construcor reference the item
refered wrong item/ recycler view id in those
3. in onbindviewholder method, didnt use get positon method, instead, creating new obj which contains nothing
4. missing add() mehod when creating the list to show
check for all reference including:
fragment container id
recycler / item view 's id
widget's id
OOM out of memory
The image referred to is too big. use a android picture resource maker