選擇困難症的福音——團隊Scrum衝刺階段-Day 2

選擇困難症的福音——團隊Scrum衝刺階段-Day 2

今日進展

  • 編寫提問部分
    • 如何將不一樣的問題選項鍊接到不一樣的下一個問題
    • 如何保證問題的連接不會弄丟
  • 登錄註冊界面
    • 完成密碼可見與不可見的更改
    • ui界面太難看了!!!改!!
    • 有必定想更改按鈕樣式的想法
    • 還有點想增長背景音樂
  • 數據庫更新
    • 參考數據庫教材P334頁代碼編寫GetDBConnection類,實現與數據庫的鏈接
login.setOnClickListener(new OnClickListener() {
    public void onClick(View v) {
        Intent intent1;
        String name = username.getText().toString();
        String pass = password.getText().toString();
    
        Log.i("TAG", "username is" + name + "userpass is" + pass);
    
        UserService uService = new UserService(LoginActivity.this);
        boolean flag = uService.login(name, pass);
        if (flag) {
            Log.i("TAG", "Log right");
            Toast.makeText(LoginActivity.this, "Log right", Toast.LENGTH_LONG).show();
            AlertDialog.Builder dialog = new android.app.AlertDialog.Builder(LoginActivity.this);
            dialog.setTitle("Attention");
            dialog.setMessage("Do you want to do the following test ?");
            
            dialog.setPositiveButton("OK",new
        android.content.DialogInterface.OnClickListener(){
    public void onClick(android.content.DialogInterface dialog,int which){
    Intent intent1 = new Intent(LoginActivity.this, AAvtivity.class);
                            startActivity(intent1);
    }
        });
        dialog.setNegativeButton("Cancel",new android.content.DialogInterface.OnClickListener(){
    public void onClick(android.content.DialogInterface dialog,int which){
        Intent intent = new Intent(LoginActivity.this,YizhiActivity.class);
            startActivity(intent);
            }
        });
        dialog.show();
    } else {
        Log.i("TAG", "Log false");
    Toast.makeText(LoginActivity.this, "Log false", Toast.LENGTH_LONG).show();
                }
            }
        });

問題困難

  • 改按鈕樣式的想法
    首先在drawable下建立一個shape.xml,在xml裏編寫的屬性
    增長背景音樂、而後再佈局文件xml裏的button添加引用就能夠了android:background="@drawable/引用名"
    咱們準備用的是這個:
<?xml version="1.0" encoding="utf-8"?>
<selector
    xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:color="#f8f8f8"
        android:state_pressed="true">
        <shape>
            <stroke android:width="1dip" android:color="#c1dbc0" />
            <corners android:radius="4dp" />
        </shape>
    </item>
    <item android:state_focused="true">
        <shape>
            <stroke android:width="1dip" android:color="#c1dbc0" />
            <corners android:radius="4dp" />
        </shape>
    </item>
    <item>
        <shape>
            <gradient android:startColor="#e3f2e2" android:endColor="#e3f2e2"></gradient>
            <stroke android:width="1dip" android:color="#c1dbc0" />
            <corners android:radius="4dip" />
        </shape>
    </item>
</selector>

其中:android

  1. solid 表示背景顏色。
  2. corners 表示圓角程度。
  3. stroke表示邊框線,能夠設置邊框和背景色
  • 比較想增長一個背景音樂
    掃描本地的音樂文件,而後利用intent調用本地的播放器播放音樂,可是本地根本就沒有音樂啊???而後看了看模擬器也沒有找到在哪裏添加音樂,music好像不能下載音樂。困惑是:模擬器中沒有音樂文件,如何向模擬器中導入音樂文件方便本身寫程序測試查找?
    最後上網搜了一下一個比較治根的方法:
    一、經過模擬器自帶瀏覽器,打開搜索引擎搜幾首歌曲下載到本地
    二、使用真機測試
    在這過程當中咱們就發現device monitor沒了!咋回事

官網上的解釋大概就是被棄用了,但能夠在android-sdk/tools/目錄的命令行中輸入如下內容數據庫

monitor瀏覽器

進入CMD窗口2,cd到目標文件夾tools下,而後輸入命令montior,接下來,咱們就能夠看到期待已久的Android Device Monitor界面了:3app

明日任務

嚴域俊:鏈接不一樣選項對應的小遊戲窗口
吳恆佚:鏈接不一樣選項對應的小遊戲窗口,找回R文件
曾程:博客、todolist
劉辰:登錄界面的動畫
鄧煜坤:數據庫更新
你們一塊兒思考:更改按鈕樣式的想法增長背景音樂佈局

今日貢獻量

嚴域俊 吳恆佚 曾程 劉辰 鄧煜坤
3 3.5 2.5 3.2 2.6

站立式會議

TODOlist

相關文章
相關標籤/搜索