In this section, you'll add the files
to your app to include functionality
to display the daily special.
And it'll update daily of course,
being a daily special.
These all sound so tasty.
And you'll learn how to use
container from Tag Manager to update
the daily special.
To get ready though, you need to add
the daily special activity to your app.
You'll add the Show Daily Special
button to the main activity.
Then you'll need to add
the button in the main layout.
And then you'll need to add the on
click code in Main Activity, so
that when the user presses the button,
they see the daily special.
So you'll need to add the Java class for
ShowDailySpecialActivity.
It's very similar to the other
classes such as ShowRecipeActivity.
It shows the info box, and
also we're going to have it
include an Order Online button.
And you can hardwire the value
of the daily special for now.
Don't forget to update
the Android manifest.
I always forget that,
and then I get an error.
You'll need to add the layout file for
the Show Daily Special activity screen.
It's much like the other screens,
such as, show recipe or
show dinner suggestion.
And in this case we just have
this one button, Order Online.
And of course, don't forget to
run the app and try it out.
I encourage you to write the code and
create the config files yourself.
But if you're not in the mood for
it, we've provided predefined versions
of ShowDailySpecialActivity and
the new layout files that you're
going to need to add to your code.
So go ahead and do these steps, and
check the boxes when you're done.
في هذا القسم، ستضيف الملفات
إلى التطبيق لتضمين وظيفة
لعرض طبق اليوم.
وسيتم تحديثها يوميًا بالطبع،
لأنه طبق اليوم.
يبدو كل هذا جيدًا.
وستتعلم كيفية استخدام حاوية من
Tag Manager لتحديث
طبق اليوم.
لتكون مستعدًا، ستحتاج إلى إضافة
نشاط طبق اليوم إلى التطبيق.
ستضيف زر Show Daily Special
إلى النشاط الأساسي.
بعد ذلك ستحتاج إلى إضافة الزر
في التخطيط الأساسي.
بعد ذلك ستحتاج إلى إضافة التعليمة
البرمجية لـ on click في النشاط الأساسي
بحيث عندما يضغط المستخدم
على الزر، يشاهد طبق اليوم
لذا ستحتاج إلى إضافة فئة Java
من أجل ShowDailySpecialActivity.
وهذا مشابه للفئات الأخرى
مثل ShowRecipeActivity.
يعرض خانة المعلومات
وسنقوم بتضمين زر Order Online فيه.
ويمكنك ربط قيمة طبق اليوم الحالية.
لا تنس تحديث بيان Android.
أنا أنسى ذلك دائمًا،
ويظهر لي خطأ لاحقًا.
ستحتاج إلى إضافة ملف التخطيط
لشاشة نشاط Show Daily Special
إنها تشبه الشاشات الأخرى كثيرًا،
مثل عرض الوصفة
أو عرض مقترح العشاء.
وفي هذه الحالة سيكون لدينا هذا
الزر الوحيد، Order Online.
وبالطبع، لا تنس تشغل التطبيق وتجربته.
أنا أشجعك على كتابة التعليمة البرمجية
وإنشاء ملفات التهيئة بنفسك.
وإن كنت لا ترغب في ذلك
فقد قدمنا إصدارات معدة مسبقًا من
ShowDailySpecialActivity
وملفات التخطيط الجديدة التي ستحتاج
إلى إضافتها إلى التعليمة البرمجية.
انطلق ونفذ هذه الخطوات،
وحدد الخانات عند الانتهاء.
Nesta seção, você adicionará os arquivos
ao aplicativo
para incluir funcionalidade
de exibição do especial do dia.
Ele será atualizado diariamente,
pois é um especial do dia.
Todos parecem deliciosos.
E você aprenderá a usar
o contêiner do Tag Manager
para atualizar o especial do dia.
Para se preparar, é preciso adicionar
a atividade daily special ao aplicativo.
Você adicionará
o botão Show Daily Special
à atividade principal.
Depois, precisará adicionar o botão
ao layout principal.
Em seguida, você precisará adicionar
o código de clique à atividade principal
para que,
ao pressionar o botão,
o usuário veja o especial do dia.
Você precisará adicionar a classe Java
para ShowDailySpecialActivity.
É muito semelhante a outras classes,
como ShowRecipeActivity.
Ela mostra a caixa de informações,
e também valor ter que
incluir um botão Order Online.
Você pode inserir o valor
do especial do dia de forma provisória por enquanto.
Não se esqueça de atualizar
o manifesto do Android.
Eu sempre esqueço
e recebo um erro.
Você deverá adicionar o arquivo de layout
da tela da atividade
Show Daily Special.
É parecido como outras telas,
como show recipe
ou show dinner suggestion.
E, neste caso,
só temos este botão,
Order Online.
E, claro, não esqueça
de executar e testar o aplicativo.
Eu incentivo você a escrever o código
e criar os arquivos de configuração sozinho.
Mas se não estiver no clima,
fornecemos versões pré-definidas
de ShowDailySpecialActivity
e dos novos arquivos de layout
de que precisará
para adicionar seu código.
Vá em frente. Realize estas etapas
e marque as caixas ao concluir.
本节中 将在应用中添加文件
此文件包含显示每日特色菜的功能
该功能将更新菜品日报 成为每日特色菜
这些听起来都很好吃
你将学习如何使用 Tag Manager 的容器来
更新每日特色菜
要做好准备 需要在应用中添加每日特色菜 activity
你需要将 Show Daily Special 按钮添加到 MainActivity
在主布局中添加此按钮
在 MainActivity 中添加点击代码
这样当用户按下按钮时 他们将看到每日特色菜
你需要为 ShowDailySpecialActivity 添加 Java 类
这与其他类 如 ShowRecipeActivity 非常相似
将显示信息框
我们还将使其包括 Order Online 按钮
现在可以坚守每日特色菜的值
不要忘更新 Android manifest
我总是会忘记这一步 然后就会出现错误
需要为 Show Daily Special 页面添加布局文件
这与其他页面 如 Show Recipe 或 Show Dinner Suggestion
非常类似
在本案例中 我们只有 Order Online 这一个按钮
当然 不要忘运行应用尝试一下
我鼓励你们写下代码并自己创建配置文件
但是如果没有心情做这些
我们提供了 ShowDailySpecialActivity 的预定义版本和
新的布局文件 你需要将它们添加到你的代码中
继续执行这些步骤 完成后勾选这些方框