Add dynamic title in dashboard and round icon luncher
BIN
app/src/main/ic_launcher_round-web.png
Normal file
After Width: | Height: | Size: 126 KiB |
@ -34,18 +34,22 @@ public class DashboardActivity extends AppCompatActivity {
|
||||
|
||||
switch (item.getItemId()) {
|
||||
case R.id.navigation_marks:
|
||||
setTitle(R.string.title_marks);
|
||||
transaction.replace(R.id.fragment_container, marksFragment);
|
||||
transaction.commit();
|
||||
return true;
|
||||
case R.id.navigation_attendance:
|
||||
setTitle(R.string.title_attendance);
|
||||
transaction.replace(R.id.fragment_container, attendanceFragment);
|
||||
transaction.commit();
|
||||
return true;
|
||||
case R.id.navigation_dashboard:
|
||||
setTitle(R.string.title_dashboard);
|
||||
transaction.replace(R.id.fragment_container, boardFragment);
|
||||
transaction.commit();
|
||||
return true;
|
||||
case R.id.navigation_lessonplan:
|
||||
setTitle(R.string.title_lessonplan);
|
||||
transaction.replace(R.id.fragment_container, lessonplanFragment);
|
||||
transaction.commit();
|
||||
return true;
|
||||
@ -64,6 +68,8 @@ public class DashboardActivity extends AppCompatActivity {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_dashboard);
|
||||
|
||||
setTitle(R.string.title_dashboard);
|
||||
|
||||
BottomNavigationView navigation = (BottomNavigationView) findViewById(R.id.navigation);
|
||||
navigation.setSelectedItemId(R.id.navigation_dashboard);
|
||||
navigation.setOnNavigationItemSelectedListener(mOnNavigationItemSelectedListener);
|
||||
|
@ -145,7 +145,10 @@ public class Login extends AsyncTask<Void, Void, Void> {
|
||||
Toast.makeText(activity, userMesage , Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
Intent intent = new Intent(activity,DashboardActivity.class);
|
||||
activity.startActivity(intent);
|
||||
if (userMesage.equals(activity.getString(R.string.login_accepted))){
|
||||
Intent intent = new Intent(activity,DashboardActivity.class);
|
||||
activity.startActivity(intent);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class LoadingTask extends AsyncTask<Void, Void, Void> {
|
||||
/* Intent intent = new Intent(activity,MainActivity.class);
|
||||
activity.startActivity(intent); */
|
||||
|
||||
Intent intent = new Intent(activity,DashboardActivity.class);
|
||||
Intent intent = new Intent(activity,MainActivity.class);
|
||||
activity.startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
@ -10,4 +10,8 @@
|
||||
android:layout_height="match_parent"
|
||||
android:text="Fragment Oceny" />
|
||||
|
||||
<ExpandableListView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</FrameLayout>
|
||||
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 27 KiB |
@ -19,6 +19,4 @@
|
||||
<string name="title_attendance">Attendance</string>
|
||||
<string name="title_lessonplan">Lesson Plan</string>
|
||||
<string name="title_settings">Settings</string>
|
||||
|
||||
<string name="hello_blank_fragment">TO JEST FRAGMENT</string>
|
||||
</resources>
|
||||
|