Skip to content

Commit f882872

Browse files
author
mahdisahraei
committed
one bug in searchview was repaired
1 parent 030a6ff commit f882872

4 files changed

Lines changed: 18 additions & 4 deletions

File tree

.idea/misc.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/java/com/mahdi/roomdatabase/Data/dao/ContactDAO.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
package com.mahdi.roomdatabase.Data.dao;
22

3-
import androidx.lifecycle.LiveData;
3+
44
import androidx.room.Dao;
55
import androidx.room.Delete;
66
import androidx.room.Insert;
77
import androidx.room.Query;
88
import androidx.room.Update;
9-
109
import com.mahdi.roomdatabase.Data.entity.Contact;
11-
1210
import java.util.List;
1311

1412

app/src/main/java/com/mahdi/roomdatabase/Data/entity/Contact.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.mahdi.roomdatabase.Data.entity;
22

3+
34
import androidx.room.ColumnInfo;
45
import androidx.room.Entity;
56
import androidx.room.PrimaryKey;
@@ -53,12 +54,18 @@ public void setAge(int age) {
5354
this.age = age;
5455
}
5556

56-
5757
public int getImage() {
5858
return image;
5959
}
6060

6161
public void setImage(int image) {
6262
this.image = image;
6363
}
64+
65+
66+
@Override
67+
public String toString() {
68+
return "outcome: " + name;
69+
}
70+
6471
}

app/src/main/java/com/mahdi/roomdatabase/Views/SearchActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import androidx.lifecycle.Observer;
66
import androidx.lifecycle.ViewModelProvider;
77
import android.os.Bundle;
8+
import android.util.Log;
89
import android.widget.ArrayAdapter;
910
import android.widget.ListView;
1011
import android.widget.SearchView;

0 commit comments

Comments
 (0)