문제

i want set my footer at the top layer of my app. it should not have any shakes and moves while the activity navigation or showing up the keyboard. it should always settled in the bottom of the screen. how to do that? any ideas plz.

도움이 되었습니까?

해결책

이것은 일 수 있습니다.

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();
.

웹 앱의 모든 작업 정의에 대해 똑같은 타이머를 추가하려고합니다.)

다른 팁

차이점은 onpause가 "파괴"를하기 전에 먼저 실행을 끝내야한다는 것입니다. onstop은보기가 이미 배경에 이미 표시된 후에 다음과 같은 라이프 사이클 스테이지입니다.

onpause에서 내부에서 저장하는 것이 필요한 항목이 여전히 그대로 유지되기 전에 여전히 그대로 유지되거나 edittext에 텍스트를 저장하거나 RadioButtons의 On / Off 위치를 저장해야합니다.

할당은 더 이상 이러한 것들을 필요로하지 않으므로 onstop 에서 그렇게하는 경우 괜찮을 것입니다.

You can do that. I tried that and its working.. the keyboard is hiding my footer..

Here I am pasting my code snippet..

 <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>

Check whether it help you or not

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top