diff --git a/app/build.gradle b/app/build.gradle index 6c37ec9..9204a42 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -37,14 +37,28 @@ dependencies { - implementation 'androidx.appcompat:appcompat:1.4.2' - implementation 'com.google.android.material:material:1.6.1' - implementation 'com.google.android.gms:play-services-maps:17.0.1' +// implementation 'androidx.appcompat:appcompat:1.4.2' +// implementation 'com.google.android.material:material:1.6.1' +// implementation 'com.google.android.gms:play-services-maps:17.0.1' +// implementation 'androidx.constraintlayout:constraintlayout:2.1.4' +// implementation 'com.google.firebase:firebase-firestore:23.0.2' +// implementation 'androidx.navigation:navigation-fragment:2.6.0' +// implementation 'androidx.navigation:navigation-ui:2.6.0' +// testImplementation 'junit:junit:4.13.2' +// androidTestImplementation 'androidx.test.ext:junit:1.1.3' +// androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + + + implementation 'androidx.appcompat:appcompat:1.5.1' + implementation 'com.google.android.material:material:1.7.0' + implementation 'com.google.android.gms:play-services-maps:18.1.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'com.google.firebase:firebase-firestore:23.0.2' + implementation 'androidx.navigation:navigation-fragment:2.5.3' + implementation 'androidx.navigation:navigation-ui:2.5.3' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + androidTestImplementation 'androidx.test.ext:junit:1.1.4' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0' // Retrofit implementation "com.squareup.retrofit2:retrofit:2.9.0" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index ae0c403..bfbc83b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -5,7 +5,7 @@ - + + + + + + + + + + + + + friendsLiveData; - private final MutableLiveData requestedLiveData; - private final MutableLiveData> requestingLiveData; - - // コンストラクタ - public FriendViewModel() { - this.retrofit = new Retrofit.Builder() - .baseUrl("http://nitta-lab-www.is.konan-u.ac.jp/nemophila/") - .addConverterFactory(JacksonConverterFactory.create()) - .build(); - this.friendsRest = retrofit.create(FriendsRest.class); - this.friendsLiveData = new MutableLiveData<>(); - this.requestedLiveData = new MutableLiveData<>(); - this.requestingLiveData = new MutableLiveData<>(); - } - - // ライブデータの取得(ゲッター) - public MutableLiveData getFriendsLiveData() { - return friendsLiveData; - } - public MutableLiveData getRequestedLiveData() { - return requestedLiveData; - } - public MutableLiveData> getRequestingLiveData() { return requestingLiveData; } - - public void searchFriend(String uid,String fid, String token) { - Call call = friendsRest.putFriend (); - call.enqueue(new Callback() { - @Override - public void onResponse(Call call, Response response) { - if (response.isSuccessful()) { - System.out.println("Successful"); - } else { - System.out.println("ResponseError"); - } - } - @Override - public void onFailure(Call call, Throwable t) { - System.out.println(" NetworkError" + t); - } - }); - } -} +//package com.example.nemophila.viewmodels; +// +//import androidx.lifecycle.MutableLiveData; +//import androidx.lifecycle.ViewModel; +// +//import com.example.nemophila.entities.Post; +//import com.example.nemophila.resources.AccountsRest; +//import com.example.nemophila.resources.FriendsRest; +// +//import java.util.Collection; +// +//import retrofit2.Call; +//import retrofit2.Callback; +//import retrofit2.Response; +//import retrofit2.Retrofit; +//import retrofit2.converter.jackson.JacksonConverterFactory; +// +//public class FriendViewModel extends ViewModel { +// // フィールド +// private final Retrofit retrofit; +// private final FriendsRest friendsRest; +// // ライブデータ +// private final MutableLiveData friendsLiveData; +// private final MutableLiveData requestedLiveData; +// private final MutableLiveData> requestingLiveData; +// +// // コンストラクタ +// public FriendViewModel() { +// this.retrofit = new Retrofit.Builder() +// .baseUrl("http://nitta-lab-www.is.konan-u.ac.jp/nemophila/") +// .addConverterFactory(JacksonConverterFactory.create()) +// .build(); +// this.friendsRest = retrofit.create(FriendsRest.class); +// this.friendsLiveData = new MutableLiveData<>(); +// this.requestedLiveData = new MutableLiveData<>(); +// this.requestingLiveData = new MutableLiveData<>(); +// } +// +// // ライブデータの取得(ゲッター) +// public MutableLiveData getFriendsLiveData() { +// return friendsLiveData; +// } +// public MutableLiveData getRequestedLiveData() { +// return requestedLiveData; +// } +// public MutableLiveData> getRequestingLiveData() { return requestingLiveData; } +// +// public void searchFriend(String uid,String fid, String token) { +// Call call = friendsRest.putFriend (); +// call.enqueue(new Callback() { +// @Override +// public void onResponse(Call call, Response response) { +// if (response.isSuccessful()) { +// System.out.println("Successful"); +// } else { +// System.out.println("ResponseError"); +// } +// } +// @Override +// public void onFailure(Call call, Throwable t) { +// System.out.println(" NetworkError" + t); +// } +// }); +// } +//} diff --git a/app/src/main/res/layout/activity_maps.xml b/app/src/main/res/layout/activity_maps.xml new file mode 100644 index 0000000..05b3440 --- /dev/null +++ b/app/src/main/res/layout/activity_maps.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_maps.xml b/app/src/main/res/layout/fragment_maps.xml new file mode 100644 index 0000000..59319fb --- /dev/null +++ b/app/src/main/res/layout/fragment_maps.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/menu/navdrawer_menu.xml b/app/src/main/res/menu/navdrawer_menu.xml new file mode 100644 index 0000000..6048d10 --- /dev/null +++ b/app/src/main/res/menu/navdrawer_menu.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/navigation/navigation.xml b/app/src/main/res/navigation/navigation.xml new file mode 100644 index 0000000..a021417 --- /dev/null +++ b/app/src/main/res/navigation/navigation.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index 946d321..b8304c8 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -1,6 +1,6 @@ -