2016-05-28 13 views
0

私はキャンパス学生ポータルのAndroidアプリ版を開発しています。Androidライブラリー(1週間)ビュースケジューラー(日付なし)

だから一人の学生が持っているクラスの「スケジュール」を示している機能が存在し、それがWebアプリケーションと同等で、次のようになります

enter image description here

問題は、私が見つけるためには至っていない、ありますこの機能に準拠した既存のライブラリです。私が見ているのは、週のビューを持つカレンダーですが、正確な日付が付いています。 私はちょうど日曜日から土曜日の日、行ヘッダーの時刻表、そして正確であると示された月、日付、または年がない単純なスケジューラーが必要です。

また、全体のタイムテーブルはスペースがかかりすぎるように見えるため、ビューでは1日のタイムテーブルのみが表示され、次に左右にスクロールすると、他の日にナビゲートします。

alamkanakのWeek Viewに近いライブラリーは、ビューポート内に1日しか表示されない週ビューがありますが、それはまだ非常に不必要な日付を示しています。

enter image description here

あなたはそれがあるとまったく同じように私の特徴に合った任意のライブラリの提案を持っていますか?または、上記のような既存のライブラリの回避策を変更して、週表示を表示するように変更するのみ日付がなくタイムテーブルのみが表示されます。 gridview2gridview3については

答えて

0
  1. 使用このxmlファイルを

    <?xml version="1.0" encoding="utf-8"?> 
    
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
        xmlns:tools="http://schemas.android.com/tools" 
        android:layout_width="match_parent" 
        android:layout_height="match_parent" 
        android:orientation="horizontal" 
        android:paddingBottom="@dimen/activity_vertical_margin" 
        android:weightSum="2" 
    tools:context="com.mobilefirst.vediosurfacedemo.GridActivity"> 
    
    <LinearLayout 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_weight="0.3" 
    android:orientation="vertical"> 
    
    <GridView xmlns:android="http://schemas.android.com/apk/res/android" 
        android:id="@+id/gridview1" 
        android:layout_width="match_parent" 
        android:layout_height="50dp" 
        android:layout_gravity="center_horizontal" 
        android:listSelector="@android:color/transparent" 
        android:numColumns="7" 
        android:stretchMode="columnWidth" /> 
    
        <GridView xmlns:android="http://schemas.android.com/apk/res/android" 
        android:id="@+id/gridview2" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:layout_gravity="center_horizontal" 
        android:layout_marginTop="20dp" 
        android:background="@null" 
        android:choiceMode="multipleChoiceModal" 
        android:listSelector="@android:color/transparent" 
        android:numColumns="7" 
        android:stretchMode="columnWidth" /> 
        </LinearLayout> 
    
    
        <LinearLayout 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_weight="1.6" 
    android:orientation="vertical"> 
    
    
    <GridView xmlns:android="http://schemas.android.com/apk/res/android" 
        android:id="@+id/gridview" 
        android:layout_width="match_parent" 
        android:layout_height="50dp" 
        android:layout_gravity="center_horizontal" 
        android:listSelector="@android:color/transparent" 
        android:numColumns="1" 
        android:stretchMode="columnWidth" /> 
    
    <GridView xmlns:android="http://schemas.android.com/apk/res/android" 
        android:id="@+id/gridview3" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:layout_gravity="center_horizontal" 
        android:layout_marginTop="20dp" 
        android:background="@null" 
        android:listSelector="@android:color/transparent" 
        android:numColumns="1" 
        android:stretchMode="columnWidth" /> 
    
        </LinearLayout> 
        </LinearLayout> 
    
  2. 同じレイアウトファイルを使用します。これにより、Webアプリケーションと同じ外観になります。

  3. 設定gridview1Weekdays ArrayAdapter.

+0

に申し訳ありませんが、私はデザインで表示ように見えることはできません。 。 。 。 。それはまた、エラー "複数のルートタグ"ので、私はまた、そのアプリケーションを実行するときにその出力を見ることができないと言います。そのレイアウトを示すリンクや何かを教えてください。 – anobilisgorse

+0

私は今すぐ動作するはずのコードを更新しました。 –

関連する問題