Как установить нижний колонтитул на верхнем уровне приложения в Android?
-
22-09-2019 - |
Вопрос
Я хочу установить нижний колонтитул на верхнем уровне моего приложения. У него не должно быть никаких встряхивания и движений во время навигации по активности или отображения клавиатуры. Он всегда должен быть установлен в нижней части экрана. как это сделать? Любые идеи, пожалуйста.
Решение
Это может быть это
foreach (SPJobDefinition job in site.WebApplication.JobDefinitions)
{
if(job.Name.Equals("MyTimerJob"))
job.Delete();
MyTimerJob timerJob = new MyTimerJob(site.WebApplication);
SPMinuteSchedule schedule = new SPMinuteSchedule();
schedule.BeginSecond = 0;
schedule.Interval = 5;
timerJob.Schedule = schedule;
timerJob.Update();
}
.
должен быть
foreach (SPJobDefinition job in site.WebApplication.JobDefinitions)
{
if(job.Name.Equals("MyTimerJob"))
job.Delete();
}
MyTimerJob timerJob = new MyTimerJob(site.WebApplication);
SPMinuteSchedule schedule = new SPMinuteSchedule();
schedule.BeginSecond = 0;
schedule.Interval = 5;
timerJob.Schedule = schedule;
timerJob.Update();
.
Вы пытаетесь добавить тот же таймер для каждого определения работы в веб-приложении;)
Другие советы
Разница состоит в том, что активность видит к нему, что оно должно завершить выполнение в первую очередь до «уничтожения» мнения, в то время как OnStop - это этап жизненного цикла, который следует после того, как представление уже находятся в фоновом режиме - означает, что активность больше не видна.
Делать вещи внутри onsPause гарантируют, что элементы, которые вам нужны для сохранения, все еще не повреждены, прежде чем отпустить их - например, вам нужно сохранить текст в вашем Edittext, или положение включения / выключения радиообуттонов и т. Д.
.DeviceLocation, однако, больше не нуждается в этих вещах, поэтому должно быть в порядке, если вы сделаете это в вашем Onstop
Вы можете сделать это. Я попробовал это и работает .. клавиатура скрывает мой нижний колонтитул ..
Здесь я вставляю свой фрагмент кода ..
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:layout_width="fill_parent"
android:orientation="vertical" android:layout_below="@+id/top_layout"
android:id="@+id/control_layout" android:layout_height="fill_parent"
android:layout_centerVertical="true" android:layout_centerHorizontal="true"
android:background="@drawable/bg" android:fadingEdge="horizontal|vertical"
android:fitsSystemWindows="true">
<EditText android:layout_width="wrap_content"
android:textStyle="normal" android:typeface="serif"
android:imeOptions="actionDone|flagNoEnterAction" android:textSize="14sp"
android:text="Enter TExt here"
android:isScrollContainer="true" android:scrollHorizontally="false"
android:layout_height="fill_parent" android:layout_marginBottom="45dip"
android:scrollbarStyle="insideInset" android:id="@+id/edit_text"
android:background="@android:color/transparent" android:gravity="top"
android:paddingBottom="1dip" android:paddingLeft="2dip"
android:paddingRight="1dip" android:paddingTop="1dip" android:visibility="visible"></EditText>
</LinearLayout>
<LinearLayout android:layout_width="fill_parent"
android:orientation="vertical" android:id="@+id/main_layout"
android:gravity="bottom" android:isScrollContainer="true"
android:layout_height="wrap_content" android:layout_alignParentBottom="true">
<LinearLayout android:id="@+id/bottom_panel"
android:layout_height="wrap_content" android:orientation="horizontal"
android:layout_width="fill_parent" android:background="@drawable/bottom_panel_bg">
<Button android:layout_width="wrap_content" android:text="Explore"
android:background="@drawable/explore" android:layout_gravity="center_vertical"
android:id="@+id/explore_text" android:textColor="#FFFFFF"
android:gravity="bottom" android:paddingRight="1dip"
android:layout_height="fill_parent" android:textColorHighlight="#FFFFA6"
android:typeface="serif" android:layout_marginLeft="5dip"></Button>
<Button android:layout_width="wrap_content" android:id="@+id/search_text"
android:background="@drawable/btn_search" android:gravity="bottom"
android:text="Search" android:textColor="#FFFFFF"
android:layout_height="fill_parent" android:typeface="serif"
android:layout_marginLeft="11dip"></Button>
<Button android:layout_width="wrap_content" android:id="@+id/fav_text"
android:text="Favorite" android:background="@drawable/favorites_text"
android:gravity="bottom" android:textColor="#FFFFFF"
android:layout_height="fill_parent" android:typeface="serif"
android:layout_marginLeft="10dip"></Button>
<Button android:layout_width="wrap_content" android:text="My Data"
android:id="@+id/my_text" android:background="@drawable/my_texts"
android:gravity="bottom" android:textColor="#FFFFFF"
android:layout_height="fill_parent" android:typeface="serif"
android:layout_marginLeft="11dip"></Button>
<Button android:id="@+id/about_us" android:background="@drawable/about_us"
android:gravity="bottom" android:textColor="#FFFFFF"
android:layout_gravity="center_horizontal" android:text="About"
android:layout_height="fill_parent" android:textColorHighlight="#FFFFA6"
android:layout_width="wrap_content" android:typeface="serif"
android:layout_marginLeft="11dip"></Button>
</LinearLayout>
</LinearLayout>
Проверьте, поможет ли это вам или нет