adding pictures instead
|
@ -18,7 +18,8 @@
|
|||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".wiimmfi.WiimmfiActivity"/>
|
||||
<activity android:name=".wiimmfi.WiimmfiActivity"
|
||||
android:theme="@style/Theme.WiimmfiWatcher.Watching"/>
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -11,6 +11,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||
import androidx.room.Room;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.android.material.tabs.TabLayout;
|
||||
|
||||
import me.brysonsteck.wiimmfiwatcher.database.AppDatabase;
|
||||
import me.brysonsteck.wiimmfiwatcher.fragments.AboutFragment;
|
||||
|
@ -31,7 +32,7 @@ public class MainActivity extends AppCompatActivity {
|
|||
if (savedInstanceState == null) {
|
||||
aboutButton.setVisibility(View.VISIBLE);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.friend_code_input_fragment, new WatchCodeFragment(), null)
|
||||
.replace(R.id.friend_code_input_fragment, new WatchCodeFragment(true), null)
|
||||
.setReorderingAllowed(true)
|
||||
.commit();
|
||||
}
|
||||
|
@ -52,6 +53,36 @@ public class MainActivity extends AppCompatActivity {
|
|||
.commit();
|
||||
});
|
||||
|
||||
// TabLayout tabLayout = findViewById(R.id.tablayout_main);
|
||||
// tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
||||
// @Override
|
||||
// public void onTabSelected(TabLayout.Tab tab) {
|
||||
// if (tab.getText().equals("Friend Code")) {
|
||||
// getSupportFragmentManager().beginTransaction()
|
||||
// .replace(R.id.friend_code_input_fragment, new WatchCodeFragment(true), null)
|
||||
// .setReorderingAllowed(true)
|
||||
// .commit();
|
||||
//
|
||||
// }
|
||||
// else if (tab.getText().equals("Mii Name")) {
|
||||
// getSupportFragmentManager().beginTransaction()
|
||||
// .replace(R.id.friend_code_input_fragment, new WatchCodeFragment(false), null)
|
||||
// .setReorderingAllowed(true)
|
||||
// .commit();
|
||||
// }
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public void onTabUnselected(TabLayout.Tab tab) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onTabReselected(TabLayout.Tab tab) {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
//
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,9 +27,11 @@ import me.brysonsteck.wiimmfiwatcher.wiimmfi.WiimmfiActivity;
|
|||
|
||||
public class WatchCodeFragment extends Fragment {
|
||||
ProgressDialog progressBar;
|
||||
boolean friendCodeMode = true;
|
||||
|
||||
public WatchCodeFragment() {
|
||||
public WatchCodeFragment(boolean friendCodeMode) {
|
||||
super(R.layout.watch_code_fragment);
|
||||
this.friendCodeMode = friendCodeMode;
|
||||
}
|
||||
|
||||
public boolean isValidFriendCode(String friendCode) {
|
||||
|
@ -107,6 +109,9 @@ public class WatchCodeFragment extends Fragment {
|
|||
recyclerView.setAdapter(adapter);
|
||||
|
||||
EditText friendCode = view.findViewById(R.id.friend_code_edit_text);
|
||||
if (!friendCodeMode) {
|
||||
friendCode.setHint(R.string.enter_mii);
|
||||
}
|
||||
Button watchButton = view.findViewById(R.id.watch_button);
|
||||
watchButton.setOnClickListener(buttonClick -> {
|
||||
startWiimmfiActivity(
|
||||
|
|
BIN
app/src/main/res/drawable/battle_bp.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/res/drawable/battle_ccw.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/res/drawable/battle_dp.jpg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/res/drawable/battle_fs.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
app/src/main/res/drawable/battle_rbc3.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/res/drawable/battle_rbc4.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
app/src/main/res/drawable/battle_rcl.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
app/src/main/res/drawable/battle_rs.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
app/src/main/res/drawable/battle_rth.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/res/drawable/battle_td.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/res/drawable/course_bc.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
app/src/main/res/drawable/course_cm.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
app/src/main/res/drawable/course_ctgp.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/res/drawable/course_dc.jpg
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
app/src/main/res/drawable/course_ddr.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/res/drawable/course_dks.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/res/drawable/course_gv.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
app/src/main/res/drawable/course_kc.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
app/src/main/res/drawable/course_lc.jpg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/res/drawable/course_mc.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
app/src/main/res/drawable/course_mg.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/res/drawable/course_mh.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/course_mmm.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/res/drawable/course_mt.jpg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/res/drawable/course_rbc.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
app/src/main/res/drawable/course_rbc3.jpg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/res/drawable/course_rdh.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
app/src/main/res/drawable/course_rdkjp.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/res/drawable/course_rdkm.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/res/drawable/course_rds.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/res/drawable/course_rgv2.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/res/drawable/course_rmc.jpg
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
app/src/main/res/drawable/course_rmc3.jpg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
app/src/main/res/drawable/course_rmr.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/res/drawable/course_rpb.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/res/drawable/course_rpg.jpg
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
app/src/main/res/drawable/course_rr.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
app/src/main/res/drawable/course_rsgb.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
app/src/main/res/drawable/course_rsl.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
app/src/main/res/drawable/course_rws.jpg
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
app/src/main/res/drawable/course_ryf.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
app/src/main/res/drawable/course_tf.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
app/src/main/res/drawable/course_wgm.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
|
@ -31,6 +31,28 @@
|
|||
app:title="Wiimmfi Watcher"
|
||||
app:titleTextColor="@color/white" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tablayout_main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/blue_700"
|
||||
app:tabIndicatorColor="@color/white"
|
||||
app:tabMode="fixed"
|
||||
app:tabTextColor="@color/white">
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Friend Code" />
|
||||
|
||||
<com.google.android.material.tabs.TabItem
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Mii Name" />
|
||||
|
||||
</com.google.android.material.tabs.TabLayout>
|
||||
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
|
|
|
@ -15,20 +15,39 @@
|
|||
<com.google.android.material.appbar.AppBarLayout
|
||||
style="@style/Widget.MaterialComponents.AppBarLayout.Primary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="200dp"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Widget.MaterialComponents.Toolbar.Primary"
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp"
|
||||
app:navigationIcon="@drawable/ic_baseline_menu_24"
|
||||
app:navigationIconTint="#FFFFFF"
|
||||
app:title="Watching 0000-0000-0000"
|
||||
app:titleTextColor="#FFFFFF" />
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
app:expandedTitleTextAppearance="@style/TextAppearance.App.CollapsingToolbar.Expanded"
|
||||
app:collapsedTitleTextAppearance="@style/TextAppearance.App.CollapsingToolbar.Collapsed">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/course_ctgp" />
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Widget.MaterialComponents.Toolbar.Primary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent"
|
||||
android:elevation="0dp"
|
||||
app:navigationIcon="@drawable/ic_baseline_menu_24"
|
||||
app:title="Watching 0000-0000-0000"
|
||||
app:titleTextColor="#FFFFFF" />
|
||||
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
@ -51,7 +70,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:theme="@style/Theme.WiimmfiWatcher"
|
||||
android:theme="@style/Theme.WiimmfiWatcher.Watching"
|
||||
app:headerLayout="@layout/header_navigation_drawer"
|
||||
app:menu="@menu/drawer_navigation_menu">
|
||||
|
||||
|
|
|
@ -13,4 +13,28 @@
|
|||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.WiimmfiWatcher.Watching" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">#212121</item>
|
||||
<item name="colorPrimaryVariant">#000000</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/blue_200</item>
|
||||
<item name="colorSecondaryVariant">@color/blue_200</item>
|
||||
<item name="colorOnSecondary">@color/white</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.App.CollapsingToolbar.Expanded" parent="TextAppearance.MaterialComponents.Headline5">
|
||||
<item name="android:textColor">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.App.CollapsingToolbar.Collapsed" parent="TextAppearance.MaterialComponents.Headline6">
|
||||
<item name="android:textColor">@color/white</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
|
@ -12,6 +12,7 @@
|
|||
<string name="watch">Watch</string>
|
||||
<string name="watching">Watching %1$s</string>
|
||||
<string name="enter_fc">Enter a friend code to watch</string>
|
||||
<string name="enter_mii">Enter the name of a Mii to watch</string>
|
||||
<string name="recent_fc">Recently watched friend codes:</string>
|
||||
<string name="version_header">Version</string>
|
||||
<string name="version">You are running Wiimmfi Watcher version %1$s. You can view the release notes for this version <![CDATA[<a href="https://github.com/brysonsteck/wiimmfi-watcher/releases/">here.</a>]]></string>
|
||||
|
|
|
@ -10,8 +10,32 @@
|
|||
<item name="colorSecondary">@color/blue_200</item>
|
||||
<item name="colorSecondaryVariant">@color/blue_200</item>
|
||||
<item name="colorOnSecondary">@color/white</item>
|
||||
<item name="android:windowTranslucentStatus">false</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<style name="Theme.WiimmfiWatcher.Watching" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">#1E88E5</item>
|
||||
<item name="colorPrimaryVariant">#0D47A1</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<item name="backgroundColor">#ffffff</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/blue_200</item>
|
||||
<item name="colorSecondaryVariant">@color/blue_200</item>
|
||||
<item name="colorOnSecondary">@color/white</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.App.CollapsingToolbar.Expanded" parent="TextAppearance.MaterialComponents.Headline5">
|
||||
<item name="android:textColor">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.App.CollapsingToolbar.Collapsed" parent="TextAppearance.MaterialComponents.Headline6">
|
||||
<item name="android:textColor">@color/white</item>
|
||||
</style>
|
||||
|
||||
</resources>
|