Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
veena14cs committed Aug 5, 2021
2 parents 4e49e45 + 3f98e53 commit ed7044b
Show file tree
Hide file tree
Showing 15 changed files with 816 additions and 510 deletions.
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@
android:name=".app.devoptions.vieweventlogs.ViewEventLogsActivity"
android:label="@string/view_event_logs_activity_title"
android:theme="@style/OppiaThemeWithoutActionBar" />
<activity
android:name=".app.devoptions.vieweventlogs.testing.ViewEventLogsTestActivity"
android:theme="@style/OppiaThemeWithoutActionBar" />

<provider
android:name="androidx.work.impl.WorkManagerInitializer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import org.oppia.android.app.devoptions.marktopicscompleted.MarkTopicsCompletedA
import org.oppia.android.app.devoptions.marktopicscompleted.testing.MarkTopicsCompletedTestActivity
import org.oppia.android.app.devoptions.testing.DeveloperOptionsTestActivity
import org.oppia.android.app.devoptions.vieweventlogs.ViewEventLogsActivity
import org.oppia.android.app.devoptions.vieweventlogs.testing.ViewEventLogsTestActivity
import org.oppia.android.app.fragment.FragmentComponent
import org.oppia.android.app.help.HelpActivity
import org.oppia.android.app.help.faq.FAQListActivity
Expand Down Expand Up @@ -137,5 +138,6 @@ interface ActivityComponent {
fun inject(topicTestActivity: TopicTestActivity)
fun inject(topicTestActivityForStory: TopicTestActivityForStory)
fun inject(viewEventLogsActivity: ViewEventLogsActivity)
fun inject(viewEventLogsTestActivity: ViewEventLogsTestActivity)
fun inject(walkthroughActivity: WalkthroughActivity)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package org.oppia.android.app.devoptions.vieweventlogs.testing

import android.content.Context
import android.content.Intent
import android.os.Bundle
import org.oppia.android.R
import org.oppia.android.app.activity.InjectableAppCompatActivity
import org.oppia.android.app.devoptions.vieweventlogs.ViewEventLogsFragment

/** Activity for testing [ViewEventLogsFragment]. */
class ViewEventLogsTestActivity : InjectableAppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
activityComponent.inject(this)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_arrow_back_white_24dp)
setContentView(R.layout.view_event_logs_activity)
if (getViewEventLogsFragment() == null) {
val viewEventLogsFragment = ViewEventLogsFragment.newInstance()
supportFragmentManager.beginTransaction().add(
R.id.view_event_logs_container,
viewEventLogsFragment
).commitNow()
}
}

private fun getViewEventLogsFragment(): ViewEventLogsFragment? {
return supportFragmentManager
.findFragmentById(R.id.view_event_logs_container) as ViewEventLogsFragment?
}

companion object {
/** Returns [Intent] for [ViewEventLogsTestActivity]. */
fun createViewEventLogsTestIntent(context: Context): Intent {
return Intent(context, ViewEventLogsTestActivity::class.java)
}
}
}
12 changes: 6 additions & 6 deletions app/src/main/res/layout/concept_card_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
android:id="@+id/concept_card_heading_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/concept_card_heading_text_marginStart"
android:layout_marginTop="@dimen/concept_card_heading_text_marginTop"
android:layout_marginEnd="@dimen/concept_card_heading_text_marginEnd"
android:layout_marginStart="@dimen/concept_card_heading_text_margin_start"
android:layout_marginTop="@dimen/concept_card_heading_text_margin_top"
android:layout_marginEnd="@dimen/concept_card_heading_text_margin_end"
android:fontFamily="sans-serif-medium"
android:text="@{viewModel.conceptCardLiveData.skillDescription}"
android:textColor="@color/oppiaPrimaryText"
Expand All @@ -64,9 +64,9 @@
android:id="@+id/concept_card_explanation_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/concept_card_explanation_text_marginStart"
android:layout_marginTop="@dimen/concept_card_explanation_text_marginTop"
android:layout_marginEnd="@dimen/concept_card_explanation_text_marginEnd"
android:layout_marginStart="@dimen/concept_card_explanation_text_margin_start"
android:layout_marginTop="@dimen/concept_card_explanation_text_margin_top"
android:layout_marginEnd="@dimen/concept_card_explanation_text_margin_end"
android:fontFamily="sans-serif"
android:textColor="@color/oppiaPrimaryText"
android:textDirection="locale"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/view_event_logs_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
</data>

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/view_event_logs_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/values-land/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,12 @@
<dimen name="profile_edit_delete_margin_bottom">108dp</dimen>

<!-- Concept Card Fragment -->
<dimen name="concept_card_heading_text_marginStart">52dp</dimen>
<dimen name="concept_card_heading_text_marginTop">36dp</dimen>
<dimen name="concept_card_heading_text_marginEnd">52dp</dimen>
<dimen name="concept_card_explanation_text_marginStart">64dp</dimen>
<dimen name="concept_card_explanation_text_marginTop">24dp</dimen>
<dimen name="concept_card_explanation_text_marginEnd">64dp</dimen>
<dimen name="concept_card_heading_text_margin_start">52dp</dimen>
<dimen name="concept_card_heading_text_margin_top">36dp</dimen>
<dimen name="concept_card_heading_text_margin_end">52dp</dimen>
<dimen name="concept_card_explanation_text_margin_start">64dp</dimen>
<dimen name="concept_card_explanation_text_margin_top">24dp</dimen>
<dimen name="concept_card_explanation_text_margin_end">64dp</dimen>

<!-- All Topics -->
<dimen name="all_topics_text_margin_start">72dp</dimen>
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/values-sw600dp-land/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,12 @@
<dimen name="profile_edit_delete_margin_bottom">88dp</dimen>

<!-- Concept Card Fragment -->
<dimen name="concept_card_heading_text_marginStart">176dp</dimen>
<dimen name="concept_card_heading_text_marginTop">36dp</dimen>
<dimen name="concept_card_heading_text_marginEnd">176dp</dimen>
<dimen name="concept_card_explanation_text_marginStart">176dp</dimen>
<dimen name="concept_card_explanation_text_marginTop">16dp</dimen>
<dimen name="concept_card_explanation_text_marginEnd">176dp</dimen>
<dimen name="concept_card_heading_text_margin_start">176dp</dimen>
<dimen name="concept_card_heading_text_margin_top">36dp</dimen>
<dimen name="concept_card_heading_text_margin_end">176dp</dimen>
<dimen name="concept_card_explanation_text_margin_start">176dp</dimen>
<dimen name="concept_card_explanation_text_margin_top">16dp</dimen>
<dimen name="concept_card_explanation_text_margin_end">176dp</dimen>

<!-- All Topics -->
<dimen name="all_topics_text_margin_start">96dp</dimen>
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/values-sw600dp-port/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,12 @@
<dimen name="profile_edit_delete_margin_bottom">88dp</dimen>

<!-- Concept Card Fragment -->
<dimen name="concept_card_heading_text_marginStart">128dp</dimen>
<dimen name="concept_card_heading_text_marginTop">36dp</dimen>
<dimen name="concept_card_heading_text_marginEnd">128dp</dimen>
<dimen name="concept_card_explanation_text_marginStart">128dp</dimen>
<dimen name="concept_card_explanation_text_marginTop">16dp</dimen>
<dimen name="concept_card_explanation_text_marginEnd">128dp</dimen>
<dimen name="concept_card_heading_text_margin_start">128dp</dimen>
<dimen name="concept_card_heading_text_margin_top">36dp</dimen>
<dimen name="concept_card_heading_text_margin_end">128dp</dimen>
<dimen name="concept_card_explanation_text_margin_start">128dp</dimen>
<dimen name="concept_card_explanation_text_margin_top">16dp</dimen>
<dimen name="concept_card_explanation_text_margin_end">128dp</dimen>

<!-- All Topics -->
<dimen name="all_topics_text_margin_start">120dp</dimen>
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,12 @@
<dimen name="profile_edit_delete_margin_bottom">12dp</dimen>

<!-- Concept Card Fragment -->
<dimen name="concept_card_heading_text_marginStart">28dp</dimen>
<dimen name="concept_card_heading_text_marginTop">40dp</dimen>
<dimen name="concept_card_heading_text_marginEnd">28dp</dimen>
<dimen name="concept_card_explanation_text_marginStart">40dp</dimen>
<dimen name="concept_card_explanation_text_marginTop">28dp</dimen>
<dimen name="concept_card_explanation_text_marginEnd">40dp</dimen>
<dimen name="concept_card_heading_text_margin_start">28dp</dimen>
<dimen name="concept_card_heading_text_margin_top">40dp</dimen>
<dimen name="concept_card_heading_text_margin_end">28dp</dimen>
<dimen name="concept_card_explanation_text_margin_start">40dp</dimen>
<dimen name="concept_card_explanation_text_margin_top">28dp</dimen>
<dimen name="concept_card_explanation_text_margin_end">40dp</dimen>

<!-- All Topics -->
<dimen name="all_topics_text_margin_start">28dp</dimen>
Expand Down
Loading

0 comments on commit ed7044b

Please sign in to comment.