mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
ChallengeOverviewActivity / working back navigation \o/ / redesign DetailActivity
This commit is contained in:
parent
e7fd3b2b92
commit
a5cee4fbbe
14 changed files with 281 additions and 91 deletions
|
|
@ -127,14 +127,25 @@
|
|||
android:value=".ui.activities.MainActivity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activities.ChallengeDetailActivity"
|
||||
android:name=".ui.activities.ChallengeOverviewActivity"
|
||||
android:parentActivityName=".ui.activities.MainActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:launchMode="singleTask"
|
||||
tools:ignore="UnusedAttribute">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.activities.MainActivity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activities.ChallengeDetailActivity"
|
||||
android:parentActivityName=".ui.activities.MainActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:launchMode="singleTask"
|
||||
tools:ignore="UnusedAttribute">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".ui.activities.ChallengeOverviewActivity" />
|
||||
</activity>
|
||||
<activity android:name="com.facebook.FacebookActivity"
|
||||
android:configChanges=
|
||||
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
|
||||
|
|
|
|||
BIN
Habitica/res/drawable-hdpi/participants_light.png
Normal file
BIN
Habitica/res/drawable-hdpi/participants_light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 882 B |
BIN
Habitica/res/drawable-mdpi/participants_light.png
Normal file
BIN
Habitica/res/drawable-mdpi/participants_light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 572 B |
BIN
Habitica/res/drawable-xhdpi/participants_light.png
Normal file
BIN
Habitica/res/drawable-xhdpi/participants_light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
Habitica/res/drawable-xxhdpi/participants_light.png
Normal file
BIN
Habitica/res/drawable-xxhdpi/participants_light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
|
|
@ -48,32 +48,34 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginLeft="26dp"
|
||||
android:layout_marginStart="26dp"
|
||||
android:layout_marginRight="23dp"
|
||||
android:layout_marginEnd="23dp"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:adjustViewBounds="true"
|
||||
android:fitsSystemWindows="true"
|
||||
android:focusable="true"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:focusableInTouchMode="true"
|
||||
app:layout_collapseMode="parallax"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
app:layout_collapseMode="parallax">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/challenge_name"
|
||||
style="@style/Headline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/textColorDark"/>
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/textColorDark" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/challenge_description"
|
||||
style="@style/Body2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/textColorDark"
|
||||
android:lines="3"/>
|
||||
android:maxLines="3"
|
||||
android:textColor="@color/textColorDark" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
|
|
@ -81,85 +83,60 @@
|
|||
android:baselineAligned="false"
|
||||
android:weightSum="1.0">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/leader_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="middle"
|
||||
android:lines="1"
|
||||
android:textColor="@color/textColorDark" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="right">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_people_white_24dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/memberCountTextView"
|
||||
android:textColor="@color/textColorDark"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="middle"
|
||||
android:lines="1"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:text="0" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="end"
|
||||
android:weightSum="1.0">
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginTop="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/gem_prize_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="end">
|
||||
android:gravity="center"
|
||||
android:id="@+id/gem_prize_layout">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/ic_header_gem" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gemPrizeTextView"
|
||||
android:textColor="@color/textColorDark"
|
||||
android:id="@+id/gem_amount"
|
||||
style="@style/Body1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:ellipsize="middle"
|
||||
android:lines="1"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:text="0" />
|
||||
|
||||
|
||||
tools:text="15"
|
||||
android:textColor="@color/textColorDark" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="17dp"
|
||||
android:layout_marginStart="17dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:src="@drawable/participants_light" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/challenge_member_count"
|
||||
style="@style/Body1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="15"
|
||||
android:textColor="@color/textColorDark" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
|
|
@ -168,6 +145,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="@style/Toolbar"
|
||||
|
||||
app:layout_collapseMode="pin"
|
||||
app:popupTheme="@style/Theme.AppCompat.Light" />
|
||||
</android.support.design.widget.CollapsingToolbarLayout>
|
||||
|
|
|
|||
98
Habitica/res/layout/activity_challenge_overview.xml
Normal file
98
Habitica/res/layout/activity_challenge_overview.xml
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/overlayFrameLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".ui.activities.MainActivity">
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:gravity="center">
|
||||
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:id="@+id/main_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:elevation="0dp"
|
||||
tools:context=".ui.activities.MainActivity">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="false">
|
||||
|
||||
<android.support.design.widget.CollapsingToolbarLayout
|
||||
android:id="@+id/collapsing_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="false"
|
||||
app:contentScrim="?attr/colorPrimary"
|
||||
app:expandedTitleMarginEnd="?attr/actionBarSize"
|
||||
app:expandedTitleMarginStart="0dp"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
||||
app:titleEnabled="false">
|
||||
|
||||
<include
|
||||
android:id="@+id/avatar_with_bars"
|
||||
layout="@layout/avatar_with_bars"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
app:layout_collapseMode="parallax" />
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?attr/actionBarSize"
|
||||
android:theme="@style/Toolbar"
|
||||
|
||||
app:layout_collapseMode="pin"
|
||||
app:popupTheme="@style/Theme.AppCompat.Light"
|
||||
/>
|
||||
</android.support.design.widget.CollapsingToolbarLayout>
|
||||
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/detail_tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@color/brand_200"
|
||||
android:elevation="0dp"
|
||||
android:fillViewport="false"
|
||||
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:layout_anchor="@+id/collapsing_toolbar"
|
||||
app:layout_anchorGravity="bottom"
|
||||
|
||||
app:layout_collapseMode="pin"
|
||||
app:tabGravity="fill"
|
||||
app:tabIndicatorColor="@android:color/white"
|
||||
app:tabMode="fixed" />
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/floating_menu_wrapper"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:layout_behavior="com.habitrpg.android.habitica.ui.helpers.FloatingActionMenuBehavior" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</FrameLayout>
|
||||
|
|
@ -49,4 +49,11 @@
|
|||
<!--<item name="android:letterSpacing" tools:targetApi="lollipop">0.05</item>-->
|
||||
</style>
|
||||
|
||||
<style name="Headline">
|
||||
<item name="android:fontFamily" tools:targetApi="jelly_bean">
|
||||
@string/font_family_condensed
|
||||
</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
@ -8,6 +8,7 @@ import com.habitrpg.android.habitica.modules.AppModule;
|
|||
import com.habitrpg.android.habitica.receivers.LocalNotificationActionReceiver;
|
||||
import com.habitrpg.android.habitica.ui.activities.AboutActivity;
|
||||
import com.habitrpg.android.habitica.ui.activities.ChallengeDetailActivity;
|
||||
import com.habitrpg.android.habitica.ui.activities.ChallengeOverviewActivity;
|
||||
import com.habitrpg.android.habitica.ui.activities.ClassSelectionActivity;
|
||||
import com.habitrpg.android.habitica.ui.activities.FullProfileActivity;
|
||||
import com.habitrpg.android.habitica.ui.activities.GroupFormActivity;
|
||||
|
|
@ -199,4 +200,6 @@ public interface AppComponent {
|
|||
void inject(ChallengeTaskRecyclerViewFragment challengeTaskRecyclerViewFragment);
|
||||
|
||||
void inject(ChallengeDetailActivity challengeDetailActivity);
|
||||
|
||||
void inject(ChallengeOverviewActivity challengeOverviewActivity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,14 +86,13 @@ public class ChallengeDetailActivity extends BaseActivity {
|
|||
@BindView(R.id.challenge_description)
|
||||
TextView challengeDescription;
|
||||
|
||||
|
||||
@BindView(R.id.memberCountTextView)
|
||||
@BindView(R.id.challenge_member_count)
|
||||
TextView memberCountTextView;
|
||||
|
||||
@BindView(R.id.gem_prize_layout)
|
||||
LinearLayout gem_prize_layout;
|
||||
|
||||
@BindView(R.id.gemPrizeTextView)
|
||||
@BindView(R.id.gem_amount)
|
||||
TextView gemPrizeTextView;
|
||||
|
||||
private Challenge challenge;
|
||||
|
|
@ -125,4 +124,15 @@ public class ChallengeDetailActivity extends BaseActivity {
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSupportNavigateUp() {
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
package com.habitrpg.android.habitica.ui.activities;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.TabLayout;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.View;
|
||||
|
||||
import com.habitrpg.android.habitica.APIHelper;
|
||||
import com.habitrpg.android.habitica.HabiticaApplication;
|
||||
import com.habitrpg.android.habitica.R;
|
||||
import com.habitrpg.android.habitica.components.AppComponent;
|
||||
import com.habitrpg.android.habitica.ui.AvatarWithBarsViewModel;
|
||||
import com.habitrpg.android.habitica.ui.fragments.social.challenges.ChallengesOverviewFragment;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import butterknife.BindView;
|
||||
|
||||
public class ChallengeOverviewActivity extends BaseActivity {
|
||||
|
||||
@BindView(R.id.detail_tabs)
|
||||
TabLayout detail_tabs;
|
||||
|
||||
@BindView(R.id.toolbar)
|
||||
Toolbar toolbar;
|
||||
|
||||
@BindView(R.id.avatar_with_bars)
|
||||
View avatar_with_bars;
|
||||
|
||||
@Inject
|
||||
public APIHelper apiHelper;
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutResId() {
|
||||
return R.layout.activity_challenge_overview;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
setupToolbar(toolbar);
|
||||
|
||||
getSupportActionBar().setTitle(R.string.challenges);
|
||||
|
||||
ChallengesOverviewFragment fragment = new ChallengesOverviewFragment();
|
||||
fragment.setTabLayout(detail_tabs);
|
||||
fragment.setUser(HabiticaApplication.User);
|
||||
|
||||
AvatarWithBarsViewModel avatarInHeader = new AvatarWithBarsViewModel(this, avatar_with_bars);
|
||||
avatarInHeader.updateData(HabiticaApplication.User);
|
||||
|
||||
if (getSupportFragmentManager().getFragments() == null) {
|
||||
getSupportFragmentManager().beginTransaction().add(R.id.fragment_container, fragment).commitAllowingStateLoss();
|
||||
} else {
|
||||
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
||||
transaction.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out, android.R.anim.fade_in, android.R.anim.fade_out);
|
||||
transaction.replace(R.id.fragment_container, fragment).addToBackStack(null).commitAllowingStateLoss();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void injectActivity(AppComponent component) {
|
||||
component.inject(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSupportNavigateUp() {
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +1,5 @@
|
|||
package com.habitrpg.android.habitica.ui.fragments;
|
||||
|
||||
import com.habitrpg.android.habitica.APIHelper;
|
||||
import com.habitrpg.android.habitica.helpers.SoundManager;
|
||||
import com.habitrpg.android.habitica.ui.activities.MainActivity;
|
||||
import com.magicmicky.habitrpgwrapper.lib.models.HabitRPGUser;
|
||||
import com.raizlabs.android.dbflow.sql.builder.Condition;
|
||||
import com.raizlabs.android.dbflow.sql.language.Select;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.design.widget.TabLayout;
|
||||
|
|
@ -15,6 +8,13 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.habitrpg.android.habitica.APIHelper;
|
||||
import com.habitrpg.android.habitica.helpers.SoundManager;
|
||||
import com.habitrpg.android.habitica.ui.activities.MainActivity;
|
||||
import com.magicmicky.habitrpgwrapper.lib.models.HabitRPGUser;
|
||||
import com.raizlabs.android.dbflow.sql.builder.Condition;
|
||||
import com.raizlabs.android.dbflow.sql.language.Select;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public abstract class BaseMainFragment extends BaseFragment {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import android.widget.LinearLayout;
|
|||
import android.widget.TextView;
|
||||
|
||||
import com.habitrpg.android.habitica.APIHelper;
|
||||
import com.habitrpg.android.habitica.HabiticaApplication;
|
||||
import com.habitrpg.android.habitica.R;
|
||||
import com.habitrpg.android.habitica.components.AppComponent;
|
||||
import com.habitrpg.android.habitica.events.commands.OpenFullProfileCommand;
|
||||
|
|
@ -111,15 +112,14 @@ public class ChallengesOverviewFragment extends BaseMainFragment {
|
|||
@Subscribe
|
||||
public void onEvent(ShowChallengeTasksCommand cmd){
|
||||
|
||||
View dialogLayout = activity.getLayoutInflater().inflate(R.layout.dialog_challenge_detail, null);
|
||||
View dialogLayout = HabiticaApplication.currentActivity.getLayoutInflater().inflate(R.layout.dialog_challenge_detail, null);
|
||||
|
||||
Challenge challenge = new Select().from(Challenge.class).where(Condition.column("id").is(cmd.challengeId)).querySingle();
|
||||
|
||||
ChallegeDetailDialogHolder challegeDetailDialogHolder = new ChallegeDetailDialogHolder(dialogLayout, activity);
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity)
|
||||
.setView(dialogLayout)
|
||||
;
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(HabiticaApplication.currentActivity)
|
||||
.setView(dialogLayout);
|
||||
|
||||
challegeDetailDialogHolder.bind(builder.show(), apiHelper, user, challenge);
|
||||
}
|
||||
|
|
@ -201,10 +201,11 @@ public class ChallengesOverviewFragment extends BaseMainFragment {
|
|||
Bundle bundle = new Bundle();
|
||||
bundle.putString(ChallengeDetailActivity.CHALLENGE_ID, challenge.id);
|
||||
|
||||
Intent intent = new Intent(activity, ChallengeDetailActivity.class);
|
||||
Intent intent = new Intent(HabiticaApplication.currentActivity, ChallengeDetailActivity.class);
|
||||
intent.putExtras(bundle);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
//intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
|
||||
startActivity(intent);
|
||||
this.dialog.dismiss();
|
||||
}
|
||||
|
||||
@OnClick(R.id.challenge_join_btn)
|
||||
|
|
@ -216,7 +217,7 @@ public class ChallengesOverviewFragment extends BaseMainFragment {
|
|||
challenge.async().save();
|
||||
|
||||
userChallengesFragment.addItem(challenge);
|
||||
dialog.hide();
|
||||
this.dialog.dismiss();
|
||||
}, throwable -> {
|
||||
});
|
||||
}
|
||||
|
|
@ -246,6 +247,8 @@ public class ChallengesOverviewFragment extends BaseMainFragment {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String customTitle() {
|
||||
return getString(R.string.challenges);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.habitrpg.android.habitica.ui.menu;
|
|||
|
||||
import com.habitrpg.android.habitica.R;
|
||||
import com.habitrpg.android.habitica.ui.activities.AboutActivity;
|
||||
import com.habitrpg.android.habitica.ui.activities.ChallengeOverviewActivity;
|
||||
import com.habitrpg.android.habitica.ui.activities.GemPurchaseActivity;
|
||||
import com.habitrpg.android.habitica.ui.activities.MainActivity;
|
||||
import com.habitrpg.android.habitica.ui.activities.PrefsActivity;
|
||||
|
|
@ -133,7 +134,7 @@ public class MainDrawerBuilder {
|
|||
break;
|
||||
}
|
||||
case SIDEBAR_CHALLENGES: {
|
||||
fragment = new ChallengesOverviewFragment();
|
||||
newActivityClass = ChallengeOverviewActivity.class;
|
||||
break;
|
||||
}
|
||||
case SIDEBAR_SHOPS: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue